Comparison

plugins/mod_tokenauth.lua @ 12919:7c0e5c7eff7c

mod_tokenauth: Fix misplaced closing parenthesis `type(x ~= y)` is always a string, thus truthy
author Kim Alvefur <zash@zash.se>
date Thu, 02 Mar 2023 22:34:29 +0100
parent 12917:e4de42495fb7
child 12938:055b03d3059b
comparison
equal deleted inserted replaced
12918:ed20555f163a 12919:7c0e5c7eff7c
23 23
24 if token_host ~= module.host then 24 if token_host ~= module.host then
25 return nil, "invalid-host"; 25 return nil, "invalid-host";
26 end 26 end
27 27
28 if (token_data and type(token_data) ~= "table") or (token_purpose and type(token_purpose ~= "string")) then 28 if (token_data and type(token_data) ~= "table") or (token_purpose and type(token_purpose) ~= "string") then
29 return nil, "bad-request"; 29 return nil, "bad-request";
30 end 30 end
31 31
32 local token_info = { 32 local token_info = {
33 owner = actor_jid; 33 owner = actor_jid;