mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Do not check the second SASL challenge
This commit is contained in:
parent
42a9e4f4cf
commit
3631301304
@ -223,9 +223,6 @@ sasl_new(<<"DIGEST-MD5">>, User, Server, Password) ->
|
|||||||
MyResponse = response(User, Password, Nonce, AuthzId,
|
MyResponse = response(User, Password, Nonce, AuthzId,
|
||||||
Realm, CNonce, DigestURI, NC, QOP,
|
Realm, CNonce, DigestURI, NC, QOP,
|
||||||
<<"AUTHENTICATE">>),
|
<<"AUTHENTICATE">>),
|
||||||
ServerResponse = response(User, Password, Nonce,
|
|
||||||
AuthzId, Realm, CNonce, DigestURI,
|
|
||||||
NC, QOP, <<"">>),
|
|
||||||
Resp = <<"username=\"", User/binary, "\",realm=\"",
|
Resp = <<"username=\"", User/binary, "\",realm=\"",
|
||||||
Realm/binary, "\",nonce=\"", Nonce/binary,
|
Realm/binary, "\",nonce=\"", Nonce/binary,
|
||||||
"\",cnonce=\"", CNonce/binary, "\",nc=", NC/binary,
|
"\",cnonce=\"", CNonce/binary, "\",nc=", NC/binary,
|
||||||
@ -236,18 +233,12 @@ sasl_new(<<"DIGEST-MD5">>, User, Server, Password) ->
|
|||||||
fun (ServerIn2) ->
|
fun (ServerIn2) ->
|
||||||
case cyrsasl_digest:parse(ServerIn2) of
|
case cyrsasl_digest:parse(ServerIn2) of
|
||||||
bad -> {error, <<"Invalid SASL challenge">>};
|
bad -> {error, <<"Invalid SASL challenge">>};
|
||||||
KeyVals2 ->
|
_KeyVals2 ->
|
||||||
RspAuth = xml:get_attr_s(<<"rspauth">>,
|
|
||||||
KeyVals2),
|
|
||||||
if RspAuth == ServerResponse ->
|
|
||||||
{<<"">>,
|
{<<"">>,
|
||||||
fun (_) ->
|
fun (_) ->
|
||||||
{error,
|
{error,
|
||||||
<<"Invalid SASL challenge">>}
|
<<"Invalid SASL challenge">>}
|
||||||
end};
|
end}
|
||||||
true ->
|
|
||||||
{error, <<"Invalid SASL challenge">>}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end}
|
end}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user