Reservierungssystem: E-Mail-Feld & Bild-Captcha hinzugefuegt

Aenderungen:
- E-Mail-Feld im Reservierungs-Formular hinzugefuegt (Pflichtfeld)
- Math-Captcha durch Bild-Captcha (4 Zeichen) ersetzt
- E-Mail-Validierung im Backend
- Captcha-Validierung fuer Reservierungen
- Pillow zu Dockerfile hinzugefuegt
This commit is contained in:
Peter
2026-05-16 13:29:25 +00:00
parent f26d02573e
commit ea90a3c9e3
6 changed files with 137 additions and 36 deletions
+3 -2
View File
@@ -7,8 +7,8 @@ auth_bp = Blueprint('auth', __name__)
@auth_bp.route('/api/captcha', methods=['GET'])
def get_captcha():
captcha = generate_captcha()
session['captcha_answer'] = captcha['answer']
return jsonify({"question": captcha['question'], "token": captcha['token']})
# captcha enthaelt jetzt 'image' und 'token' (kein 'answer' mehr)
return jsonify({"image": captcha["image"], "token": captcha["token"]})
@auth_bp.route('/api/admin/login', methods=['POST'])
def admin_login():
@@ -32,3 +32,4 @@ def check_session():
role = session.get('user_role')
if role:
return jsonify({"role": role, "logged_in": True})
return jsonify({"logged_in": False})