mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/web/ejabberd_http.erl (parse_auth): Allow password that
include colon character (EJAB-522) SVN Revision: 1322
This commit is contained in:
parent
977a20700a
commit
98e47e8c73
@ -1,3 +1,8 @@
|
||||
2008-05-12 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/web/ejabberd_http.erl (parse_auth): Allow password that
|
||||
include colon character (EJAB-522)
|
||||
|
||||
2008-05-09 Mickael Remond <mremond@process-one.net>
|
||||
|
||||
* src/mod_ip_blacklist.erl: Better error handling (EJAB-625).
|
||||
|
@ -635,11 +635,14 @@ parse_auth(_Orig = "Basic " ++ Auth64) ->
|
||||
{error, _Err} ->
|
||||
undefined;
|
||||
Auth ->
|
||||
case string:tokens(Auth, ":") of
|
||||
[User, Pass] ->
|
||||
{User, Pass};
|
||||
_ ->
|
||||
undefined
|
||||
%% Auth should be a string with the format: user@server:password
|
||||
%% Note that password can contain additional characters '@' and ':'
|
||||
case string:chr(Auth, $:) of
|
||||
0 ->
|
||||
undefined;
|
||||
SplitIndex ->
|
||||
{User, [$: | Pass]} = lists:split(SplitIndex-1, Auth),
|
||||
{User, Pass}
|
||||
end
|
||||
end;
|
||||
parse_auth(_) ->
|
||||
|
Loading…
Reference in New Issue
Block a user