Skip to content

Commit 30fe849

Browse files
author
Simon MacMullen
committed
If there is no password, refuse access rather than blowing up.
1 parent 8b84368 commit 30fe849

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rabbit_auth_backend_internal.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ hash_password(Cleartext) ->
203203
<<Salt/binary, Hash/binary>>.
204204

205205
check_password(Cleartext, <<Salt:4/binary, Hash/binary>>) ->
206-
Hash =:= salted_md5(Salt, Cleartext).
206+
Hash =:= salted_md5(Salt, Cleartext);
207+
check_password(_Cleartext, _Any) ->
208+
false.
207209

208210
make_salt() ->
209211
{A1,A2,A3} = now(),

0 commit comments

Comments
 (0)