Merge pull request 'Fix multiple crashes' (#7) from augustin64/MsRewards-Reborn:augustin64-patch-1 into master

Tu es dur avec le « multiple crashes »
This commit is contained in:
piair 2024-02-23 20:42:07 +01:00
commit fc8e666927
2 changed files with 4 additions and 1 deletions

View File

@ -174,7 +174,7 @@ def change_password():
global password global password
if request.method == 'POST': if request.method == 'POST':
password = request.form["password"] password = request.form["password"]
subprocess.Popen([f"grafana-cli admin reset-admin-password {password}"]) subprocess.Popen(["grafana-cli", "admin", "reset-admin-password", password])
with open("/app/MsRewards-Reborn/user_data/flask.json", "w") as inFile: with open("/app/MsRewards-Reborn/user_data/flask.json", "w") as inFile:
data = { data = {
"password": password, "password": password,

3
V6.py
View File

@ -836,6 +836,9 @@ def very_custom_start(json):
cred = g._cred[i] cred = g._cred[i]
g._mail = cred[0] g._mail = cred[0]
g._password = cred[1] g._password = cred[1]
if cred[2] != '':
g._otp = TOTP(cred[2])
start = False start = False
for j in ["unban", "tout", "pc", "mobile", "daily"]: for j in ["unban", "tout", "pc", "mobile", "daily"]:
try: try: