cyrillic
This commit is contained in:
parent
4c21e22426
commit
2128672378
4 changed files with 7 additions and 7 deletions
|
@ -14,7 +14,6 @@ from files.helpers.discord import add_role
|
|||
from shutil import copyfile
|
||||
import requests
|
||||
|
||||
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
||||
valid_password_regex = re.compile("^.{8,100}$")
|
||||
|
||||
YOUTUBE_KEY = environ.get("YOUTUBE_KEY", "").strip()
|
||||
|
@ -533,7 +532,7 @@ def settings_security_post(v):
|
|||
if request.values.get("new_password") != request.values.get("cnf_password"):
|
||||
return render_template("settings_security.html", v=v, error="Passwords do not match.")
|
||||
|
||||
if not re.match(valid_password_regex, request.values.get("new_password")):
|
||||
if not re.fullmatch(valid_password_regex, request.values.get("new_password")):
|
||||
return render_template("settings_security.html", v=v, error="Password must be between 8 and 100 characters.")
|
||||
|
||||
if not v.verifyPass(request.values.get("old_password")):
|
||||
|
@ -860,7 +859,7 @@ def settings_name_change(v):
|
|||
v=v,
|
||||
error="You didn't change anything")
|
||||
|
||||
if not re.match(valid_username_regex, new_name):
|
||||
if not re.fullmatch(valid_username_regex, new_name):
|
||||
return render_template("settings_profile.html",
|
||||
v=v,
|
||||
error="This isn't a valid username.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue