From aaf391b284d9dbe0f86a098f52529942ec2b37a6 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 1 Sep 2022 13:00:56 +0200 Subject: [PATCH] Catch all errors from jose_jwt:verify and log debugging details (#3890) --- src/ejabberd_auth_jwt.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ejabberd_auth_jwt.erl b/src/ejabberd_auth_jwt.erl index f38600bc7..d1fe4d15a 100644 --- a/src/ejabberd_auth_jwt.erl +++ b/src/ejabberd_auth_jwt.erl @@ -146,6 +146,9 @@ check_jwt_token(User, Server, Token) -> {false, _, _} -> false catch - error:{badarg, _} -> + A:B -> + ?DEBUG("jose_jwt:verify failed ~n for account ~p@~p~n " + " JWK and token: ~p~n with error: ~p", + [User, Server, {JWK, Token}, {A, B}]), false end.