diff options
author | Matthew Wild <mwild1@gmail.com> | 2023-03-01 18:43:54 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2023-03-01 18:43:54 +0000 |
commit | 9e02d322d8f8bfe4b7cdae3c2da33827d7defa60 (patch) | |
tree | 2102bd536588771e692f5e02bd0f03f7d5647a83 /plugins | |
parent | 4ce832123e0e8a0c0a0ef58391f51f864c05005a (diff) | |
download | prosody-9e02d322d8f8bfe4b7cdae3c2da33827d7defa60.tar.gz prosody-9e02d322d8f8bfe4b7cdae3c2da33827d7defa60.zip |
mod_tokenauth: Gracefully handle missing tokens
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_tokenauth.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua index 8b24bc17..1eb5c66b 100644 --- a/plugins/mod_tokenauth.lua +++ b/plugins/mod_tokenauth.lua @@ -49,6 +49,7 @@ function create_jid_token(actor_jid, token_jid, token_role, token_ttl, token_dat end local function parse_token(encoded_token) + if not encoded_token then return nil; end local token = base64.decode(encoded_token); if not token then return nil; end local token_jid, token_id = token:match("^1;([^;]+);(.+)$"); |