gf
This commit is contained in:
parent
351d09043d
commit
eee2f5bff5
2 changed files with 3 additions and 1 deletions
|
@ -656,6 +656,8 @@ valid_password_regex = re.compile("^.{8,100}$", flags=re.A)
|
|||
|
||||
marsey_regex = re.compile("^(:[!#A-Za-z0-9]{1,30}?:\s*)+$", flags=re.A)
|
||||
|
||||
marsey_regex2 = re.compile("[a-z0-9]{1,30}", flags=re.A)
|
||||
|
||||
image_regex = re.compile("(^https:\/\/.*\.(png|jpg|jpeg|gif|webp|maxwidth=9999|fidelity=high)($|\s))", flags=re.I|re.M|re.A)
|
||||
|
||||
valid_sub_regex = re.compile("^[a-zA-Z0-9_\-]{3,20}$", flags=re.A)
|
||||
|
|
|
@ -268,7 +268,7 @@ def api_comment(v):
|
|||
marsey = loads(body.lower())
|
||||
name = marsey["name"]
|
||||
|
||||
if not marsey_regex.fullmatch(name):
|
||||
if not marsey_regex2.fullmatch(name):
|
||||
return {"error": "Invalid name!"}, 403
|
||||
|
||||
if "author" in marsey: author_id = get_user(marsey["author"]).id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue