From: Badlop Date: Mon, 5 Sep 2011 21:21:38 +0000 (+0200) Subject: Fix SCRAM to support attributes which value has only one character X-Git-Tag: v3.0.0-alpha-4~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6d58d13f7b16b0b658a125479e8790c58f1f99e;p=ejabberd Fix SCRAM to support attributes which value has only one character --- diff --git a/src/cyrsasl_scram.erl b/src/cyrsasl_scram.erl index d1c218be1..6dbf810b9 100644 --- a/src/cyrsasl_scram.erl +++ b/src/cyrsasl_scram.erl @@ -138,7 +138,7 @@ mech_step(#state{step = 4} = State, ClientIn) -> parse_attribute(Attribute) -> AttributeLen = string:len(Attribute), if - AttributeLen > 3 -> + AttributeLen >= 3 -> SecondChar = lists:nth(2, Attribute), case is_alpha(lists:nth(1, Attribute)) of true ->