forked from rDrama/rDrama
1
0
Fork 0

Merge branch 'frost' into dasher

master
kek7198 2021-12-21 20:36:18 -06:00
commit 70446dd7e2
5 changed files with 5 additions and 15 deletions

View File

@ -58,7 +58,7 @@ app.config["RATELIMIT_ENABLED"] = True
app.config["RATELIMIT_DEFAULTS_DEDUCT_WHEN"]=lambda:True
app.config["RATELIMIT_DEFAULTS_EXEMPT_WHEN"]=lambda:False
app.config["RATELIMIT_HEADERS_ENABLED"]=True
app.config["CACHE_TYPE"] = "redis"
app.config["CACHE_TYPE"] = "filesystem"
app.config["CACHE_DIR"] = "cache"
app.config["RATELIMIT_STORAGE_URL"] = environ.get("REDIS_URL", "redis://localhost")
app.config['MAIL_SERVER'] = 'smtp.gmail.com'

View File

@ -130,8 +130,6 @@ if 'rdrama.net' in SITE:
MOM_ID = 4588
DONGER_ID = 541
FARTBINN_ID = 2256
PW1_ID = 3750
PW2_ID = 7626
BUG_THREAD = 29748
EMOJI_THREAD = 16583
elif SITE == "pcmemes.net":
@ -157,8 +155,6 @@ elif SITE == "pcmemes.net":
MOM_ID = 0
DONGER_ID = 0
FARTBINN_ID = 0
PW1_ID = 0
PW2_ID = 0
BUG_THREAD = 4103
EMOJI_THREAD = 0
else:
@ -184,8 +180,6 @@ else:
MOM_ID = 0
DONGER_ID = 0
FARTBINN_ID = 0
PW1_ID = 0
PW2_ID = 0
BUG_THREAD = 0
EMOJI_THREAD = 0

View File

@ -53,7 +53,7 @@ def distribute(v, cid):
return f"Each winner has received {coinsperperson} coins!"
@app.get("/truescore")
@admin_level_required(2)
@auth_desired
def truescore(v):
users = g.db.query(User).order_by(User.truecoins.desc()).limit(25).all()
if not v or v.oldsite: template = ''

View File

@ -137,9 +137,9 @@ def login_post():
session["session_id"] = token_hex(49)
session["lo_user"] = account.id
session["login_nonce"] = account.login_nonce
session.permanent = True
if account.id not in (PW1_ID,PW2_ID): check_for_alts(account.id)
check_for_alts(account.id)
redir = request.values.get("redirect", "/").replace("/logged_out", "").strip()
@ -339,6 +339,7 @@ def sign_up_post(v):
session["session_id"] = token_hex(49)
session["lo_user"] = new_user.id
session.permanent = True
g.db.commit()
@ -427,7 +428,6 @@ def post_reset(v):
user_id = request.values.get("user_id")
if user_id in (PW1_ID,PW2_ID): abort(403)
timestamp = int(request.values.get("time"))
token = request.values.get("token")

View File

@ -633,8 +633,6 @@ def verifiedcolor(v):
@validate_formkey
def settings_security_post(v):
if request.values.get("new_password"):
if v.id in (PW1_ID,PW2_ID): return render_template("settings_security.html", v=v, error="This account is protected from password changes.")
if request.values.get("new_password") != request.values.get("cnf_password"):
return render_template("settings_security.html", v=v, error="Passwords do not match.")
@ -731,8 +729,6 @@ def settings_security_post(v):
@validate_formkey
def settings_log_out_others(v):
if v.id in (PW1_ID,PW2_ID): abort(403)
submitted_password = request.values.get("password", "").strip()
if not v.verifyPass(submitted_password):