Fix remote URL content length check off-by-one

Fixes #85
This commit is contained in:
polina4096 2023-06-04 03:00:12 +03:00 committed by Mia Herkt
parent c2b5e95903
commit 8a912e8744
Signed by: mia
SSH Key Fingerprint: SHA256:wqxNmz1v3S4rHhF0I3z/ogVueFRUac93swSgNGfr8No
1 changed files with 1 additions and 1 deletions

View File

@ -400,7 +400,7 @@ def store_url(url, addr, ua, secret: bool):
if "content-length" in r.headers:
l = int(r.headers["content-length"])
if l < app.config["MAX_CONTENT_LENGTH"]:
if l <= app.config["MAX_CONTENT_LENGTH"]:
def urlfile(**kwargs):
return type('',(),kwargs)()