Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.2.5 unknown username won't be returned #253

Open
indirection42 opened this issue Mar 6, 2024 · 0 comments
Open

10.2.5 unknown username won't be returned #253

indirection42 opened this issue Mar 6, 2024 · 0 comments

Comments

@indirection42
Copy link

Since we use a default PHC string to make the verifying time-constant, the actual Unknown Username case will be early returned as Invalid password.

    spawn_blocking_with_tracing(move || {
        verify_password_hash(expected_password_hash, credentials.password)
    })
    .await 
    // early return
    .context("Failed to spawn blocking task.")??;
    user_id
        // dead code
        .ok_or_else(|| anyhow::anyhow!("Unknown username."))
        .map_err(AuthError::InvalidCredentials)
@indirection42 indirection42 changed the title 10.2.5 unknown username won't be returned because 10.2.5 unknown username won't be returned Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant