forked from MarseyWorld/MarseyWorld
cyrillic
parent
eb5192fb9c
commit
bde9531ff3
|
@ -666,4 +666,7 @@ christian_emojis = (':#marseyjesus:',':#marseyimmaculate:',':#marseymothermary:'
|
|||
|
||||
db = db_session()
|
||||
marseys_const = [x[0] for x in db.query(Marsey.name).all()] + ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','exclamationpoint','period','questionmark']
|
||||
db.close()
|
||||
db.close()
|
||||
|
||||
if SITE == 'PCM': valid_username_regex = re.compile("^[a-zA-Z0-9_\-А-я]{3,25}$")
|
||||
else: valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
|
@ -181,7 +181,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
|||
tag["target"] = "_blank"
|
||||
tag["rel"] = "nofollow noopener noreferrer"
|
||||
|
||||
if re.match("https?://\S+", str(tag.string), flags=re.A):
|
||||
if re.fullmatch("https?://\S+", str(tag.string), flags=re.A):
|
||||
try: tag.string = tag["href"]
|
||||
except: tag.string = ""
|
||||
|
||||
|
|
|
@ -4,10 +4,8 @@ from files.__main__ import app, limiter
|
|||
from files.helpers.const import *
|
||||
import requests
|
||||
|
||||
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
||||
valid_password_regex = re.compile("^.{8,100}$")
|
||||
|
||||
|
||||
@app.get("/login")
|
||||
@auth_desired
|
||||
def login_get(v):
|
||||
|
|
|
@ -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…
Reference in New Issue