mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-09-20 06:46:17 +08:00
fixed GHSA-868r-97g5-r9g4 - insufficient authentication for SSO users
This commit is contained in:
parent
4fe4bfe18e
commit
8173f6512a
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue