feat(reception): add strict anti-capture expiration to dynamic QR and fix Buenos Aires timezone display (v3.8.49)
This commit is contained in:
@@ -246,8 +246,15 @@ def test_reception_my_qr_token_endpoint(init_database):
|
||||
assert data["user_name"] == "Valeria Paz"
|
||||
assert "renewal_interval_seconds" in data
|
||||
assert data["renewal_interval_seconds"] == 3
|
||||
assert "grace_period_seconds" in data
|
||||
assert data["grace_period_seconds"] == 60
|
||||
assert data["grace_period_seconds"] == 6
|
||||
|
||||
# Verificar que el token expire y sea rechazado ante capturas de pantalla viejas (> 6s)
|
||||
expired_token = QRSecurityService.generate_qr_token(student, valid_seconds=1)
|
||||
import time
|
||||
time.sleep(1.1)
|
||||
exp_user, exp_status, exp_reason = QRSecurityService.decode_and_resolve_user(expired_token)
|
||||
assert exp_status == "DENEGADO"
|
||||
assert "expirado" in exp_reason.lower()
|
||||
|
||||
|
||||
def test_security_qr_settings_configuration(init_database):
|
||||
|
||||
Reference in New Issue
Block a user