summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpolina4096 <polina4096@yandex.ru>2023-06-04 03:00:12 +0300
committerMia Herkt <mia@0x0.st>2023-06-04 06:35:11 +0200
commit8a912e87449bd6e56ac8a83f25d0ca58982a81d3 (patch)
treef8800113cf301ab31f0f215f415f07384ce50201
parentc2b5e95903053d084ce9208a2e96226e9f5feebd (diff)
Fix remote URL content length check off-by-one
Fixes #85
-rwxr-xr-xfhost.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fhost.py b/fhost.py
index 3d45c4d..8201954 100755
--- a/fhost.py
+++ b/fhost.py
@@ -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)()