fixed storing login as lowercase to maintain compatibility

This commit is contained in:
TPD94 2025-05-01 17:01:20 -04:00
parent 6b78ac120f
commit 55f1bd9d9b

View File

@ -15,7 +15,7 @@ def login():
return jsonify({'error': f'Missing required field: {required_field}'}), 400
if verify_user(data['username'], data['password']):
session['username'] = data['username'] # Stored securely in a signed cookie
session['username'] = data['username'].lower() # Stored securely in a signed cookie
return jsonify({'message': 'Successfully logged in!'})
else:
return jsonify({'error': 'Invalid username or password!'}), 401