From 3cf53bc24898d0a6896f78a1fb8129259f451faf Mon Sep 17 00:00:00 2001 From: Machiel Date: Fri, 16 Oct 2026 18:34:55 +0200 Subject: [PATCH] Inloggen (ook CalDAV) niet hoofdlettergevoelig: het ingevoerde e-mailadres gaat in kleine letters, zoals het wordt opgeslagen Co-Authored-By: Claude Opus 5.5 --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 628f6e4..638b2af 100644 --- a/app.py +++ b/app.py @@ -616,7 +616,7 @@ def setup(): @app.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST': - user = q1('SELECT * FROM users WHERE email=? AND active=1', request.form.get('email', '').strip()) + user = q1('SELECT * FROM users WHERE email=? AND active=1', request.form.get('email', '').strip().lower()) if user and check_password_hash(user['password_hash'], request.form.get('password', '')): session.pop('portal_cid', None) session['uid'] = user['id'] @@ -3339,7 +3339,7 @@ def dav_user(): auth = request.authorization if not auth or (auth.type or '').lower() != 'basic' or not auth.username: return None - u = q1('SELECT * FROM users WHERE email=? AND active=1', auth.username.strip()) + u = q1('SELECT * FROM users WHERE email=? AND active=1', auth.username.strip().lower()) if u and u['dav_password_hash'] and check_password_hash(u['dav_password_hash'], auth.password or ''): return u return None