mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Convert password provided by web form to UTF8 before passing it (#375)
This commit is contained in:
parent
ffbe97d988
commit
c5d9d35e7b
@ -763,7 +763,8 @@ parse_auth(<<"Basic ", Auth64/binary>>) ->
|
|||||||
undefined;
|
undefined;
|
||||||
Pos ->
|
Pos ->
|
||||||
{User, <<$:, Pass/binary>>} = erlang:split_binary(Auth, Pos-1),
|
{User, <<$:, Pass/binary>>} = erlang:split_binary(Auth, Pos-1),
|
||||||
{User, Pass}
|
PassUtf8 = unicode:characters_to_binary(binary_to_list(Pass), utf8),
|
||||||
|
{User, PassUtf8}
|
||||||
end;
|
end;
|
||||||
parse_auth(<<"Bearer ", SToken/binary>>) ->
|
parse_auth(<<"Bearer ", SToken/binary>>) ->
|
||||||
Token = str:strip(SToken),
|
Token = str:strip(SToken),
|
||||||
|
Loading…
Reference in New Issue
Block a user