mirror of
https://git.0x0.st/mia/0x0.git
synced 2026-01-10 04:21:46 +03:00
add more URL validation
Turns out ShareX users and shell script authors are fucking retarded.
This commit is contained in:
2
fhost.py
2
fhost.py
@@ -107,7 +107,7 @@ def shorten(url):
|
|||||||
if len(url) > app.config["MAX_URL_LENGTH"]:
|
if len(url) > app.config["MAX_URL_LENGTH"]:
|
||||||
abort(414)
|
abort(414)
|
||||||
|
|
||||||
if not url_valid(url) or is_fhost_url(url):
|
if not url_valid(url) or is_fhost_url(url) or "\n" in url:
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
existing = URL.query.filter_by(url=url).first()
|
existing = URL.query.filter_by(url=url).first()
|
||||||
|
|||||||
Reference in New Issue
Block a user