Skip to content

Commit

Permalink
Update signup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DogukanUrker committed Jan 18, 2024
1 parent 1af529c commit 1e98a6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routes/signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
REGISTRATION,
DB_USERS_ROOT,
render_template,
RECAPTCHA_SIGN_UP,
RECAPTCHA_SITE_KEY,
RECAPTCHA_VERIFY_URL,
RECAPTCHA_SECRET_KEY,
Expand Down Expand Up @@ -57,7 +58,7 @@ def signup():
case True:
password = (sha256_crypt.hash(password))
connection = (sqlite3.connect(DB_USERS_ROOT))
match RECAPTCHA:
match RECAPTCHA and RECAPTCHA_SIGN_UP:
case True:
secretResponse = request.form["g-recaptcha-response"]
verifyResponse = requestsPost(url=f"{RECAPTCHA_VERIFY_URL}?secret={RECAPTCHA_SECRET_KEY}&response={secretResponse}").json()
Expand All @@ -67,7 +68,7 @@ def signup():
"score"
] > 0.5:
case True:
message("2",f"SIGN UP | VERIFICATION: {verifyResponse["success"]} | VERIFICATION SCORE: {verifyResponse["score"]}")
message("2",f"SIGN UP RECAPTCHA | VERIFICATION: {verifyResponse["success"]} | VERIFICATION SCORE: {verifyResponse["score"]}")
cursor = connection.cursor()
cursor.execute(
f"""
Expand Down

0 comments on commit 1e98a6c

Please sign in to comment.