Merge pull request 'corregido la guarrada' (#2) from desarrollo into main

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-01-28 15:48:44 +00:00

View File

@@ -35,9 +35,10 @@ def get_current_user(credentials: HTTPBasicCredentials | None = Depends(security
# Guarrada maxima, yo no he sido # Guarrada maxima, yo no he sido
correct_username = secrets.compare_digest(credentials.username, INT_USER) correct_username = secrets.compare_digest(credentials.username, INT_USER)
correct_password = secrets.compare_digest(credentials.password, INT_PASS) correct_password = secrets.compare_digest(credentials.password, INT_PASS)
raise HTTPException( if not (correct_username and correct_password):
status_code=status.HTTP_401_UNAUTHORIZED, raise HTTPException(
detail="Credenciales incorrectas", status_code=status.HTTP_401_UNAUTHORIZED,
) detail="Credenciales incorrectas",
)
return credentials.username return credentials.username