jid: Validate domains against idna
The idna crate validates against UTS 46, which supports domains using either IDNA2003 or IDNA2008. This allows us to support both old and new internationalized domain names. This dependency isn’t a new one in the tree, as hickory-proto, url and tokio-xmpp all were already depending on it. There are a bunch of other checks that have to be performed, this is inspired by slixmpp’s JID implementation.
This commit is contained in:
parent
f5f35eab20
commit
2a2f532c80
5 changed files with 95 additions and 28 deletions
|
|
@ -3,6 +3,8 @@ Version NEXT:
|
|||
- Add missing check for JIDs with too many `@` before the resource, such as
|
||||
`a@b@c` or `a@b@c/d` which should clearly be invalid. The new error it
|
||||
produces is named `TooManyAts`.
|
||||
- domainparts are now checked much more in-depth, using the idna crate and
|
||||
various custom rules.
|
||||
|
||||
Version 0.11.1, release 2024-07-23:
|
||||
* Breaking:
|
||||
|
|
|
|||
Loading…
Reference in a new issue