make sure u dont try to get the title of a file (always times out)

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-09-29 16:45:59 +02:00
parent ff12923eb1
commit c16654c4c7
1 changed files with 2 additions and 1 deletions

View File

@ -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)