changeset 5960:538f468f9a65

mod_http_oauth2: Simplify negation in condition
author Kim Alvefur <zash@zash.se>
date Sat, 31 Aug 2024 14:46:33 +0200
parents 111eeffb6adf
children 7308ec4aaad1
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Sat Aug 31 14:45:37 2024 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Sat Aug 31 14:46:33 2024 +0200
@@ -35,7 +35,7 @@
 	if url_parts.port then
 		local port = tonumber(url_parts.port);
 		if not port then return false; end
-		if not (port > 0 and port <= 0xffff) then return false; end
+		if port <= 0 or port > 0xffff then return false; end
 		if port ~= math.floor(port) then return false; end
 	end
 	if url_parts.host then