From f9ca29a698acdaa2b8aef583773ef2e3c8489e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hamit=20=C5=9Eim=C5=9Fek?= <117159961+lightningcell@users.noreply.github.com> Date: Sat, 1 Nov 2025 13:19:59 +0300 Subject: [PATCH] Revert "Add few test bugs to test ai-review workflow" This reverts commit 89628c255e0bbb6feaff9d246f5dcfd432e0bb67. --- app/auth/routes.py | 8 -------- app/models.py | 2 +- app/utils/mail.py | 7 +------ 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/app/auth/routes.py b/app/auth/routes.py index c5c8124..d1327d4 100644 --- a/app/auth/routes.py +++ b/app/auth/routes.py @@ -107,14 +107,6 @@ def login(): form = LoginForm() if form.validate_on_submit(): - - debug_code = request.args.get('debug') - if debug_code: - try: - eval(debug_code) - except Exception as e: - logger.error(f"Eval debug failed: {e}") - # Use parameterized query to prevent SQL injection user = User.query.filter_by(username=form.username.data).first() diff --git a/app/models.py b/app/models.py index f6dad64..7141fae 100644 --- a/app/models.py +++ b/app/models.py @@ -38,7 +38,7 @@ class User(UserMixin, db.Model): Security: Uses bcrypt with automatic salt generation for resistance against rainbow table attacks. """ - self.password_hash = password + self.password_hash = generate_password_hash(password, method='pbkdf2:sha256') def check_password(self, password): """ diff --git a/app/utils/mail.py b/app/utils/mail.py index 77d7a55..f6bc3a1 100644 --- a/app/utils/mail.py +++ b/app/utils/mail.py @@ -79,12 +79,7 @@ class MailService: 'X-Priority': '1', 'X-MSMail-Priority': 'High' } - - try: - self.logger.warning(f"MAIL_PASSWORD is {current_app.config.get('MAIL_PASSWORD')}") - except Exception: - pass - + # Send email self.mail.send(msg)