Ticket #55 (assigned defect)

Opened 13 months ago

Last modified 2 weeks ago

Authorization failed when username with even number of characters is used

Reported by: purebill Owned by: zeank
Priority: high Milestone: jsjac-1.3.2
Component: jsjac Version: 1.3
Severity: normal Keywords:
Cc:

Description

When I try to authorize using username with even number of characters in it, response for authorization string contains some strange extra character with code fffd at the end (it looks like: "charset=utf-8�")

Here is the source of authorization response:

<body rid='812475' sid='557f6c0' xmlns='http://jabber.org/protocol/httpbind' key='3d4672c442f57488deede5538076874bad3eaf73' ><response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9IjEyIixyZWFsbT0iaWx5YS11YnVudHUiLG5vbmNlPSJBbkZKZjZGZ3FvNFMxWktWQ0V1M09IYkFFbzUycjVMUm5ZbEZYN1NXIixjbm9uY2U9IjdWdlI1NXRkR01va3JiIixuYz0iMDAwMDAwMDEiLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvaWx5YS11YnVudHUiLHJlc3BvbnNlPSI3NmMxOTQ4ZWY3OGY2ZDlmYWVhMGU4MWZmZjZlZDkwZCIsY2hhcnNldD11dGYtOAA=</response></body>

If base64decode it we will see the following: username="12",realm="ilya-ubuntu",nonce="AnFJf6Fgqo4S1ZKVCEu3OHbAEo52r5LRnYlFX7SW",cnonce="7VvR55tdGMokrb",nc="00000001",qop=auth,digest-uri="xmpp/ilya-ubuntu",response="76c1948ef78f6d9faea0e81fff6ed90d",charset=utf-8?

Note '?' at the end.

Change History

Changed 12 months ago by spam38

This appears to be due to a bug in either the str2binb() or binb2b64() methods. If you replace the binb2b64(str2binb(rPlain)) call on line 832 of JSJaCConnection.js with Base64.encode(rPlain) (using the library found at http://www.webtoolkit.info/javascript-base64.html), the trailing character goes away.

Changed 7 months ago by zeank

  • status changed from new to assigned

can this be confirmed please?

which jabber server are you using?

Changed 2 weeks ago by sim

decoration Changed 1 year ago by admin

bathtub Changed 1 year ago by admin

solar system Changed 1 year ago by admin

stair parts Changed 1 year ago by admin

solar supply Changed 1 year ago by admin

Note: See TracTickets for help on using tickets.