don't allow URLs with '\\' in them

remotes/1693045480750635534/spooky-22
Aevann1 2022-07-03 04:03:40 +02:00
parent 32a35c7066
commit 3bfe9e984b
1 changed files with 4 additions and 0 deletions

View File

@ -399,6 +399,10 @@ def filter_emojis_only(title, edit=False, graceful=False):
else: return title.replace('\n','').strip()
def normalize_url(url):
if '\\' in url:
print(url, flush=True)
abort(403)
url = reddit_domain_regex.sub(r'\1https://old.reddit.com/r/', url)
url = url.replace("https://youtu.be/", "https://youtube.com/watch?v=") \