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
commit2d1b014649cdba6507a14783820c45cfbc8dba9d (patch)
tree6a6d28dd9f8a00d389cb9199a3dfa007da8cd30e
parent7c039eb4f4a9ed71961a8177f71cad048a619391 (diff)
downloadrabbitmq-server-git-2d1b014649cdba6507a14783820c45cfbc8dba9d.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 4171b99977..664a4ae90f 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])}