From d3af112bdfad1e9f9d4202fc9a97302a8cc04848 Mon Sep 17 00:00:00 2001 From: garbelo Date: Wed, 28 Jan 2026 15:47:51 +0000 Subject: [PATCH] revert 4b0f93540fd0c96eb876e5d3835c94524a624df7 revert Update backend/beyond_api/security.py --- backend/beyond_api/security.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/beyond_api/security.py b/backend/beyond_api/security.py index 151ae19..be0e6ff 100644 --- a/backend/beyond_api/security.py +++ b/backend/beyond_api/security.py @@ -35,11 +35,9 @@ def get_current_user(credentials: HTTPBasicCredentials | None = Depends(security # Guarrada maxima, yo no he sido correct_username = secrets.compare_digest(credentials.username, INT_USER) correct_password = secrets.compare_digest(credentials.password, INT_PASS) - # si no volvemos a hacer la comparación no va - if not (correct_username and correct_password): - raise HTTPException( - status_code=status.HTTP_401_UNAUTHORIZED, - detail="Credenciales incorrectas", - ) + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, + detail="Credenciales incorrectas", + ) return credentials.username