#337 [XEP-0045] Invisible Nicknames (e.g. consisting of one or more spaces) are forbidden
Reporter
mf1598
Owner
Zash
Created
Updated
Stars
★★ (2)
Tags
Compliance
Status-Fixed
Milestone-0.10
Difficulty-Easy
Type-Defect
Patch
Priority-Medium
mf1598
on
*Please provide a snippet of the part of the specification which we violate*
*if possible:*
16.1 Addresses
In order to provide consistency regarding the addresses captured in room JIDs and occupant JIDs, Room IDs MUST match the Nodeprep profile of Stringprep and Room Nicknames MUST match the Resourceprep profile of Stringprep (both of these are defined in RFC 6122). As explicitly stated in RFC 6122, both the Room ID (node) and Room Nickname (resource) portions of an Occupant JID MUST be of non-zero length. In addition, a MUC service MUST NOT allow empty or invisible Room Nicknames (i.e., Room Nicknames that consist only of one or more space characters).
*Please provide a link to the specification:*
xmpp.org/extensions/xep-0045.html
XML Traffic Snippet showing the violating functionality:
<!-- In -->
<presence type='unavailable' to='mf@n0g.at/Gajim' from='gladio@conference.n0g.at/ '>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item jid='mf@n0g.at/Gajim' affiliation='owner' nick=' ' role='moderator'/>
<status code='303'/>
<status code='110'/>
</x>
</presence>
<presence id='gajim_muc_70_ce6899' xml:lang='en' to='mf@n0g.at/Gajim' from='gladio@conference.n0g.at/ '>
<x xmlns='vcard-temp:x:update'>
<photo/>
</x>
<c ver='47EPEmSc9oqPGwcrbNtpKcYyJcE=' hash='sha-1' node='http://gajim.org' xmlns='http://jabber.org/protocol/caps'/>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item jid='mf@n0g.at/Gajim' affiliation='owner' role='moderator'/>
<status code='110'/>
</x>
</presence>
MattJ
on
I'll be sad to see this one go, I use it sometimes :)
But yes, you're right, it needs fixing. Thanks for the poke.
*Please provide a snippet of the part of the specification which we violate* *if possible:* 16.1 Addresses In order to provide consistency regarding the addresses captured in room JIDs and occupant JIDs, Room IDs MUST match the Nodeprep profile of Stringprep and Room Nicknames MUST match the Resourceprep profile of Stringprep (both of these are defined in RFC 6122). As explicitly stated in RFC 6122, both the Room ID (node) and Room Nickname (resource) portions of an Occupant JID MUST be of non-zero length. In addition, a MUC service MUST NOT allow empty or invisible Room Nicknames (i.e., Room Nicknames that consist only of one or more space characters). *Please provide a link to the specification:* xmpp.org/extensions/xep-0045.html XML Traffic Snippet showing the violating functionality: <!-- In --> <presence type='unavailable' to='mf@n0g.at/Gajim' from='gladio@conference.n0g.at/ '> <x xmlns='http://jabber.org/protocol/muc#user'> <item jid='mf@n0g.at/Gajim' affiliation='owner' nick=' ' role='moderator'/> <status code='303'/> <status code='110'/> </x> </presence> <presence id='gajim_muc_70_ce6899' xml:lang='en' to='mf@n0g.at/Gajim' from='gladio@conference.n0g.at/ '> <x xmlns='vcard-temp:x:update'> <photo/> </x> <c ver='47EPEmSc9oqPGwcrbNtpKcYyJcE=' hash='sha-1' node='http://gajim.org' xmlns='http://jabber.org/protocol/caps'/> <x xmlns='http://jabber.org/protocol/muc#user'> <item jid='mf@n0g.at/Gajim' affiliation='owner' role='moderator'/> <status code='110'/> </x> </presence>
I'll be sad to see this one go, I use it sometimes :) But yes, you're right, it needs fixing. Thanks for the poke.
ChangesWe probably want to eventually follow https://tools.ietf.org/html/draft-ietf-precis-nickname-18
ChangesIf I'm reading things correctly, all whitespace should be mapped to U+20 by resourceprep, so this should be easy. http://www.unicode.org/charts/normalization/chart_Separator-Space.html
ChangesPatch: https://prosody.im/pastebin/a3f2c611-77d1-4928-8ae5-ede5dd316dfa Testing appreciated
ChangesFixed in https://hg.prosody.im/0.10/rev/4d83876aac3e
ChangesMattJZashGoing to need a different fix in trunk since MUC has been changed so much there