summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-12-14 13:00:52 +0000
committerSimon MacMullen <simon@rabbitmq.com>2010-12-14 13:00:52 +0000
commit26a2a8af60013a80acd011fe99982e152b150991 (patch)
tree6a6d28dd9f8a00d389cb9199a3dfa007da8cd30e
parent0c40c3d7a5864a10378291734e762592059f9ed7 (diff)
downloadrabbitmq-server-26a2a8af60013a80acd011fe99982e152b150991.tar.gz
global option does not exist in R12B3.
-rw-r--r--src/rabbit_auth_mechanism_plain.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_auth_mechanism_plain.erl b/src/rabbit_auth_mechanism_plain.erl
index 4171b999..664a4ae9 100644
--- a/src/rabbit_auth_mechanism_plain.erl
+++ b/src/rabbit_auth_mechanism_plain.erl
@@ -56,9 +56,10 @@ init(_Sock) ->
[].
handle_response(Response, _State) ->
- case re:run(Response, "\\0([^\\0]*)", [{capture, all_but_first, binary},
- global]) of
- {match, [[User],[Pass]]} ->
+ %% The '%%"' at the end of the next line is for Emacs
+ case re:run(Response, "^\\0([^\\0]*)\\0([^\\0]*)$",%%"
+ [{capture, all_but_first, binary}]) of
+ {match, [User, Pass]} ->
rabbit_access_control:check_user_pass_login(User, Pass);
_ ->
{refused, io_lib:format("response ~p invalid", [Response])}