Implementation of IDN in JID as specified in RFC 6122

I added support for the international domain name to the XMPP client as specified in RFC 6122 . The RFC says:

Although XMPP applications do not report the ToASCII operation (called the "ACE label") by cable, it MUST apply this operation without an international label.

However, with the domain I have available for testing (working on ProSO 0.9.4, working on getting feedback from someone else about how Ejabberd deals with this), sending the Unicode name to the "to" field XMPP stanzas call them to immediately return the XMPP error stanza and terminate the stream. If I use the toASCII operation before sending the stanza, the connection succeeds and I can start authentication from the server.

So sending:

 <somestanza to="Γ©xample.net"/> 

It causes an error, but:

 <somestanza to="xn--xample-9ua.net"/> 

works great.

Is sending the ASCII representation (ACE label) of this domain correct? If so, what does the specification mean when it says β€œXMPP applications do not report the output of a ToASCII operation ... by wire”? If not, how can I ensure compatibility with the wrong servers?

+5
source share

Source: https://habr.com/ru/post/1206733/


All Articles