consistency

master
Aevann 2024-11-17 20:22:35 +02:00
parent 2a6600abc5
commit 23de19758e
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ from files.__main__ import app, limiter
def _make_post_url(): def _make_post_url():
url = request.values.get("url", "").replace('\x00', '').strip() url = request.values.get("url", "").replace('\x00', '').strip()
if url == '': return None if url == '': return None
if '\\' in url: stop(400) if '\\' in url:
stop(400)
if len(url) > 2048: if len(url) > 2048:
stop(400, "There's a 2048 character limit for URLs!") stop(400, "There's a 2048 character limit for URLs!")
return normalize_url(url) return normalize_url(url)