From c16654c4c785ba47aa51a782094e33dfb01fa577 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 29 Sep 2022 16:45:59 +0200 Subject: [PATCH] make sure u dont try to get the title of a file (always times out) --- files/routes/posts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 54c3afe20..b3606298a 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1220,7 +1220,8 @@ def get_post_title(v): url = request.values.get("url") if not url or '\\' in url: abort(400) - if any((url.lower().endswith(x) for x in extensions)): + checking_url = url.lower().rstrip('%3F').rstrip('?') + if any((checking_url.endswith(x) for x in extensions)): abort(400) try: x = requests.get(url, headers=titleheaders, timeout=5, proxies=proxies)