mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
misc: Catch all Base64 decoding errors
This commit is contained in:
parent
f3795e9d03
commit
538e0d4844
@ -65,7 +65,7 @@ term_to_base64(Term) ->
|
|||||||
base64_to_term(Base64) ->
|
base64_to_term(Base64) ->
|
||||||
try binary_to_term(base64:decode(Base64), [safe]) of
|
try binary_to_term(base64:decode(Base64), [safe]) of
|
||||||
Term -> {term, Term}
|
Term -> {term, Term}
|
||||||
catch _:badarg ->
|
catch _:_ ->
|
||||||
error
|
error
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user