removed some prints i added for debugging
This commit is contained in:
parent
ca0ca4741b
commit
a35085c8fd
2 changed files with 6 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +1,2 @@
|
||||||
data
|
data
|
||||||
src/static/uploads/
|
src/static/uploads
|
||||||
|
|
|
||||||
11
src/main.py
11
src/main.py
|
|
@ -169,14 +169,14 @@ def register():
|
||||||
|
|
||||||
# creates a random string
|
# creates a random string
|
||||||
random_string = secrets.token_hex(16)
|
random_string = secrets.token_hex(16)
|
||||||
print(random_string)
|
|
||||||
# uses the string to create the message that wll be encrypted
|
# uses the string to create the message that wll be encrypted
|
||||||
challenge_phrase = f"this is the unencrypted string: {random_string}"
|
challenge_phrase = f"this is the unencrypted string: {random_string}"
|
||||||
print(challenge_phrase)
|
|
||||||
# encrypts message
|
# encrypts message
|
||||||
fingerprint, encrypted_msg = pgp_encrypt_and_import(data["pgp"], challenge_phrase)
|
fingerprint, encrypted_msg = pgp_encrypt_and_import(data["pgp"], challenge_phrase)
|
||||||
print(challenge_phrase)
|
|
||||||
print(encrypted_msg)
|
|
||||||
|
|
||||||
# checks fingerprint
|
# checks fingerprint
|
||||||
if not fingerprint or not encrypted_msg:
|
if not fingerprint or not encrypted_msg:
|
||||||
|
|
@ -209,7 +209,7 @@ def verify():
|
||||||
|
|
||||||
# retrieve the phrase from the session
|
# retrieve the phrase from the session
|
||||||
expected_phrase = session.get("pgp_expected_phrase")
|
expected_phrase = session.get("pgp_expected_phrase")
|
||||||
print(expected_phrase)
|
|
||||||
|
|
||||||
# check to see if data exists
|
# check to see if data exists
|
||||||
if not data or not expected_phrase:
|
if not data or not expected_phrase:
|
||||||
|
|
@ -232,7 +232,6 @@ def verify():
|
||||||
# saves the correcty formated date of birth
|
# saves the correcty formated date of birth
|
||||||
dob = date.fromisoformat(data["date_of_birth"])
|
dob = date.fromisoformat(data["date_of_birth"])
|
||||||
|
|
||||||
|
|
||||||
# stores the data on the database
|
# stores the data on the database
|
||||||
new_user = User(
|
new_user = User(
|
||||||
username=data["username"],
|
username=data["username"],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue