]> granicus.if.org Git - ejabberd/commitdiff
Fix SCRAM to support attributes which value has only one character
authorBadlop <badlop@process-one.net>
Mon, 5 Sep 2011 21:21:38 +0000 (23:21 +0200)
committerBadlop <badlop@process-one.net>
Mon, 5 Sep 2011 21:21:38 +0000 (23:21 +0200)
src/cyrsasl_scram.erl

index 2cd14635363a487e2e0fbb9679807f2939c7c18a..002d6e4461ab613b39b935f45d64ed98bab2c2d1 100644 (file)
@@ -137,7 +137,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 ->