From 471c308c1ff4e591ea48e5ead1d30709ad14a758 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Wed, 8 Dec 2021 01:19:06 +0000 Subject: [PATCH] Fix maxrequestsize config check logic --- http2irc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http2irc.py b/http2irc.py index 1f7d4ea..32e1d01 100644 --- a/http2irc.py +++ b/http2irc.py @@ -152,7 +152,7 @@ class Config(dict): raise InvalidConfig('Invalid web hostname') if 'port' in obj['web'] and (not isinstance(obj['web']['port'], int) or not 1 <= obj['web']['port'] <= 65535): raise InvalidConfig('Invalid web port') - if 'maxrequestsize' in obj['web'] and not isinstance(obj['web']['maxrequestsize'], int) or obj['web']['maxrequestsize'] <= 0: + if 'maxrequestsize' in obj['web'] and (not isinstance(obj['web']['maxrequestsize'], int) or obj['web']['maxrequestsize'] <= 0): raise InvalidConfig('Invalid web maxrequestsize') if 'maps' in obj: seenWebPaths = {}