#337 [XEP-0045] Invisible Nicknames (e.g. consisting of one or more spaces) are forbidden

Reporter mf1598
Owner Zash
Stars ★★ (2)  
  • Compliance
  • Difficulty-Easy
  • Status-Fixed
  • Priority-Medium
  • Type-Defect
  • Milestone-0.10
  • Patch
  1. 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>

  2. 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.

    • tags Status-Accepted
  3. MattJ on

    • tags Milestone-0.10
  4. Zash on

    We probably want to eventually follow https://tools.ietf.org/html/draft-ietf-precis-nickname-18

    • title [XEP-0045] Invisible Nicknames (e.g. consisting of one or more spaces) are forbidden
  5. Zash on

    If 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

    • tags Difficulty-Easy
  6. Zash on

    Patch: https://prosody.im/pastebin/a3f2c611-77d1-4928-8ae5-ede5dd316dfa Testing appreciated

    • tags Patch
  7. Zash on

    • tags Status-Started
  8. Zash on

    Fixed in https://hg.prosody.im/0.10/rev/4d83876aac3e

    • owner MattJ Zash
    • tags Status-Fixed
  9. Zash on

    Going to need a different fix in trunk since MUC has been changed so much there

New comment