xmppjs / xmpp.js

XMPP for JavaScript
ISC License
2.18k stars 371 forks source link

SASL negotiation fails if 'mechanisms' contains boundary white spaces #952

Closed serge-medvedev closed 1 year ago

serge-medvedev commented 1 year ago

https://github.com/xmppjs/xmpp.js/blob/63aecc49157980f6d68cc58605cf8a3fef664a2a/packages/sasl/index.js#L13

An error el.text is not a function is thrown if mechanisms stream feature contains boundary whitespaces, i.e. isn't minified.

sonnyp commented 1 year ago

Do you have an example of such xml ?

serge-medvedev commented 1 year ago

Do you have an example of such xml ?

<stream:features>
    <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-bind">

       <mechanism>PLAIN</mechanism>

    </mechanisms>
</stream:features>