04/18 Enhance app (security, performance)

This commit is contained in:
2026-04-18 13:20:04 -04:00
parent b51468661e
commit 4d3f9844f0
14 changed files with 529 additions and 7 deletions
+4 -1
View File
@@ -50,7 +50,10 @@ def create_emergency():
"""Grantor creates an emergency access invitation for a trusted contact."""
data = request.get_json(silent=True) or {}
grantee_email = (data.get('grantee_email') or '').strip().lower()
wait_days = int(data.get('wait_days', 7))
try:
wait_days = int(data.get('wait_days', 7))
except (TypeError, ValueError):
return jsonify({'error': 'wait_days must be an integer'}), 400
if not grantee_email:
return jsonify({'error': 'grantee_email is required'}), 400