diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-05-23 10:43:26 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-05-23 10:43:26 +0300 |
commit | e93762a720ee7b29d918e92e36b0ca640ed29821 (patch) | |
tree | c9b049f461f3da3bff6b072d6e74c633191e3cc7 /src/ejabberd_http.erl | |
parent | Validate all certfiles on startup (diff) |
Deprecate misc:encode_base64/1 and misc:decode_base64/1
Diffstat (limited to 'src/ejabberd_http.erl')
-rw-r--r-- | src/ejabberd_http.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ejabberd_http.erl b/src/ejabberd_http.erl index f513cecb..43bbb3f0 100644 --- a/src/ejabberd_http.erl +++ b/src/ejabberd_http.erl @@ -770,7 +770,9 @@ code_to_phrase(505) -> <<"HTTP Version Not Supported">>. -spec parse_auth(binary()) -> {binary(), binary()} | {oauth, binary(), []} | undefined. parse_auth(<<"Basic ", Auth64/binary>>) -> - Auth = misc:decode_base64(Auth64), + Auth = try base64:decode(Auth64) + catch _:badarg -> <<>> + end, %% Auth should be a string with the format: user@server:password %% Note that password can contain additional characters '@' and ':' case str:chr(Auth, $:) of |