Skip to content

Digest MD5 fails due to error in Base64.js #113

@BrettHolton

Description

@BrettHolton

When using SASL Digest-MD5 mechanism, the user will recieve a bad-protocol error because the second challenge response will be:

<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>AA==</response>

instead of:

<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'></response>

I believe I have traced this down to the Base64 encode implementation. In Base64.js the encode function is implemented as a do while(), this means that the empty challenge response of "" gets encoded to AA== which then gets sent to the server and results in failure. This implementation of Base64 encoding does not cause this error.
http://www.webtoolkit.info/javascript-base64.html#.Up0Pr8Try4E

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions