Ticket #59 (closed defect: fixed)
httpbinding: sasl auth broken
| Reported by: | f.taby | Owned by: | zeank |
|---|---|---|---|
| Priority: | highest | Milestone: | jsjac-1.3.2 |
| Component: | jsjac | Version: | svn trunk |
| Severity: | blocker | Keywords: | |
| Cc: |
Description
Actual trunk and 1.3.2 is broken regarding sasl auth + http-bind.
Test: install muckl and use last jsjac trunk.
Seem's to come from _getStreamID function.
Actual don't work:
JSJaCHttpBindingConnection.prototype._getStreamID = function(slot) {
this.oDbg.log(this._req[slot].r.responseText,4);
if (!this._req[slot].r.responseXML || !this._req[slot].r.responseXML.documentElement) {
this._handleEvent('onerror',JSJaCError('503','cancel','service-unavailable'));
return;
}
var body = this._req[slot].r.responseXML.documentElement;
if (body.getAttribute('authid')) {
this.streamid = body.getAttribute('authid');
this.oDbg.log("got streamid: "+this.streamid,2);
} else {
this._timeout = setTimeout(JSJaC.bind(this._sendEmpty, this), this.getPollInterval());
return;
}
this._timeout = setTimeout(JSJaC.bind(this._process, this), this.getPollInterval());
if (!this._parseStreamFeatures(body)) return;
if (this.register) this._doInBandReg(); else this._doAuth();
};
This code below work (just by removing an else {} )
{{{
JSJaCHttpBindingConnection.prototype._getStreamID = function(slot) {
this.oDbg.log(this._req[slot].r.responseText,4);
if (!this._req[slot].r.responseXML || !this._req[slot].r.responseXML.documentElement) {
this._handleEvent('onerror',JSJaCError('503','cancel','service-unavailable'));
return;
}
var body = this._req[slot].r.responseXML.documentElement;
if (body.getAttribute('authid')) {
this.streamid = body.getAttribute('authid');
this.oDbg.log("got streamid: "+this.streamid,2);
}
this._timeout = setTimeout(JSJaC.bind(this._process, this), this.getPollInterval());
if (!this._parseStreamFeatures(body)) return;
if (this.register) this._doInBandReg(); else this._doAuth();
};
I don't know if this solution is the good one, but in my case i can't work without sasl ;)
Is it possible to take a look at this bug soon please ?
}}}
Change History
Note: See
TracTickets for help on using
tickets.
