Changeset

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
parents 12918:ed20555f163a
children 12920:cdb996637b08
files plugins/mod_tokenauth.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_tokenauth.lua	Thu Mar 02 14:37:46 2023 +0100
+++ b/plugins/mod_tokenauth.lua	Thu Mar 02 22:34:29 2023 +0100
@@ -25,7 +25,7 @@
 		return nil, "invalid-host";
 	end
 
-	if (token_data and type(token_data) ~= "table") or (token_purpose and type(token_purpose ~= "string")) then
+	if (token_data and type(token_data) ~= "table") or (token_purpose and type(token_purpose) ~= "string") then
 		return nil, "bad-request";
 	end