From e8583b961d91228a1a8fdf6119d90c350bc43fa3 Mon Sep 17 00:00:00 2001 From: LpCote <73721863+LpCote4@users.noreply.github.com> Date: Sat, 9 Nov 2024 13:08:09 -0500 Subject: [PATCH] fixed typo and translation for password change confirmation --- CTFd/api/v1/challenges.py | 32 ++++++++++++++++---------------- CTFd/utils/email/__init__.py | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CTFd/api/v1/challenges.py b/CTFd/api/v1/challenges.py index 72e749ff..b00f5002 100644 --- a/CTFd/api/v1/challenges.py +++ b/CTFd/api/v1/challenges.py @@ -68,27 +68,27 @@ from datetime import datetime, timedelta def flashTimerFonction(challenge_id, time, app_): - print(challenge_id) - print(app_) - with app_: - - challenge = FlashChallenge.query.filter_by(id=challenge_id).first_or_404() - #checker si le defi a deja ete shout - if not challenge.shout: + print(challenge_id) + print(app_) + with app_: + + challenge = FlashChallenge.query.filter_by(id=challenge_id).first_or_404() + #checker si le defi a deja ete shout + if not challenge.shout: - # le cas ou le timer aurais ete reduit et que on a une autre instance qui roulait quand meme + # le cas ou le timer aurais ete reduit et que on a une autre instance qui roulait quand meme - #checker si le challenge existe encore + #checker si le challenge existe encore - #checker si le temps est toujours le bon + #checker si le temps est toujours le bon - if time - 3 < challenge.startTime and time + 3 > challenge.startTime and challenge.state == "visible": + if time - 3 < challenge.startTime and time + 3 > challenge.startTime and challenge.state == "visible": - #checker si le defi est encore visible - - req = {'title': 'Nouveau défi Flash disponible!', 'content': challenge.name + " : " + str(challenge.value) +" points", 'type': 'toast', 'sound': True} - challenge.shout = True - outgoingNotificationPost(req) + #checker si le defi est encore visible + + req = {'title': 'Nouveau défi Flash disponible!', 'content': challenge.name + " : " + str(challenge.value) +" points", 'type': 'toast', 'sound': True} + challenge.shout = True + outgoingNotificationPost(req) diff --git a/CTFd/utils/email/__init__.py b/CTFd/utils/email/__init__.py index 7d5890f1..9215455a 100644 --- a/CTFd/utils/email/__init__.py +++ b/CTFd/utils/email/__init__.py @@ -34,7 +34,7 @@ DEFAULT_PASSWORD_RESET_BODY = ( "Cliquez sur le lien suivant pour réinitialiser votre mot de passe:\n{url}\n\n" "Si le lien n'est pas cliquable, essayez de le copier et de le coller dans votre navigateur." ) -DEFAULT_PASSWORD_CHANGE_ALERT_SUBJECT = "Password Change Confirmation for {ctf_name}" +DEFAULT_PASSWORD_CHANGE_ALERT_SUBJECT = "Confirmation de changement de mot de passe pour {ctf_name}" DEFAULT_PASSWORD_CHANGE_ALERT_BODY = ( "Votre mot de passe pour {ctf_name} a été modifié.\n\n" "Si vous n'avez pas fait de demande de changement de mot de passe, vous pouvez le modifier ici:\n{url}\n\n" -- GitLab