diff --git a/.gitignore b/.gitignore index f07e7b4..759ae93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ data -src/static/uploads/ +src/static/uploads/* diff --git a/src/main.py b/src/main.py index b640d05..3a65e68 100644 --- a/src/main.py +++ b/src/main.py @@ -169,30 +169,19 @@ def register(): # creates a random string random_string = secrets.token_hex(16) - print(random_string) # uses the string to create the message that wll be encrypted challenge_phrase = f"this is the unencrypted string: {random_string}" - print(challenge_phrase) # encrypts message fingerprint, encrypted_msg = pgp_encrypt_and_import(data["pgp"], challenge_phrase) - print(challenge_phrase) - print(encrypted_msg) # checks fingerprint if not fingerprint or not encrypted_msg: flash("Invalid PGP key or encryption failed.") return redirect(url_for("register")) - print(fingerprint) # creates a temporary session used to verify the user - session["pending_user"] = { - **data, - "profile_url": profile_url, - "pictures_urls": pictures_urls, - "fingerprint": fingerprint - } - - session['pgp_expected_phrase'] = challenge_phrase + session["pending_user"] = {**data, "profile_url": profile_url, "pictures_urls": pictures_urls} + session["pgp_expected_phrase"] = challenge_phrase # renders the verification page return render_template("verify.html", encrypted_message=encrypted_msg) @@ -202,23 +191,18 @@ def register(): @app.route("/verify", methods=["POST"]) def verify(): - # retrieve user data from the session - data = session.get("pending_user") - - fingerprint = data.get("fingerprint") - # retrieve the phrase from the session expected_phrase = session.get("pgp_expected_phrase") - print(expected_phrase) + # retrieve user data from the session + data = session.get("pending_user") # check to see if data exists if not data or not expected_phrase: flash("Session expired.") return redirect(url_for("register")) - # get the decrypted message from form + # get the decrypted message submitted = request.form.get("decrypted_message") - # check to see if submission was empty if not submitted: flash("You must paste the decrypted message.") @@ -232,7 +216,6 @@ def verify(): # saves the correcty formated date of birth dob = date.fromisoformat(data["date_of_birth"]) - # stores the data on the database new_user = User( username=data["username"], @@ -261,9 +244,9 @@ def verify(): # creates login session session['user_id'] = new_user.id session['username'] = new_user.username - # remove temporary session session.pop("pending_user", None) + session.pop("pgp_expected_phrase", None) flash("PGP verification successful! Account created.") return redirect(url_for("home")) diff --git a/static/uploads/bacalhau/selection-04-12-2025.png b/static/uploads/bacalhau/selection-04-12-2025.png deleted file mode 100644 index c35e74e..0000000 Binary files a/static/uploads/bacalhau/selection-04-12-2025.png and /dev/null differ diff --git a/static/uploads/bacalhau/selection-09-12-2025.png b/static/uploads/bacalhau/selection-09-12-2025.png deleted file mode 100644 index e6a3320..0000000 Binary files a/static/uploads/bacalhau/selection-09-12-2025.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-04-12-2025.png b/static/uploads/bacalhau/ss-04-12-2025.png deleted file mode 100644 index cb1be01..0000000 Binary files a/static/uploads/bacalhau/ss-04-12-2025.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-04-12-2025_000.png b/static/uploads/bacalhau/ss-04-12-2025_000.png deleted file mode 100644 index 44a9bbc..0000000 Binary files a/static/uploads/bacalhau/ss-04-12-2025_000.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-05-12-2025.png b/static/uploads/bacalhau/ss-05-12-2025.png deleted file mode 100644 index 627969a..0000000 Binary files a/static/uploads/bacalhau/ss-05-12-2025.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-05-12-2025_000.png b/static/uploads/bacalhau/ss-05-12-2025_000.png deleted file mode 100644 index 2e8083f..0000000 Binary files a/static/uploads/bacalhau/ss-05-12-2025_000.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-05-12-2025_001.png b/static/uploads/bacalhau/ss-05-12-2025_001.png deleted file mode 100644 index 2e8083f..0000000 Binary files a/static/uploads/bacalhau/ss-05-12-2025_001.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-24-02-2026_000.png b/static/uploads/bacalhau/ss-24-02-2026_000.png deleted file mode 100644 index 6c41ba8..0000000 Binary files a/static/uploads/bacalhau/ss-24-02-2026_000.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-24-02-2026_001.png b/static/uploads/bacalhau/ss-24-02-2026_001.png deleted file mode 100644 index e65fd38..0000000 Binary files a/static/uploads/bacalhau/ss-24-02-2026_001.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-24-02-2026_004.png b/static/uploads/bacalhau/ss-24-02-2026_004.png deleted file mode 100644 index 97c2733..0000000 Binary files a/static/uploads/bacalhau/ss-24-02-2026_004.png and /dev/null differ diff --git a/static/uploads/bacalhau/ss-24-02-2026_007.png b/static/uploads/bacalhau/ss-24-02-2026_007.png deleted file mode 100644 index 1731930..0000000 Binary files a/static/uploads/bacalhau/ss-24-02-2026_007.png and /dev/null differ