Skip to content

Commit

Permalink
fixed GHSA-868r-97g5-r9g4 - insufficient authentication for SSO users
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Jul 7, 2023
1 parent 4fe4bfe commit 8173f65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions warpgate-protocol-http/src/api/sso_provider_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ impl Api {
let mut state = state_arc.lock().await;
let mut cp = services.config_provider.lock().await;

if state.username() != username {
return Ok(Err(format!(
"Incorrect account for SSO authentication ({username})"
)));
}

if cp.validate_credential(&username, &cred).await? {
state.add_valid_credential(cred);
}
Expand Down

0 comments on commit 8173f65

Please sign in to comment.