Skip to content

Commit

Permalink
fixed #129 - auth bypass when user.require is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Jun 10, 2022
1 parent 89e93c1 commit d771fa0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions warpgate-common/src/config_providers/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@ impl ConfigProvider for FileConfigProvider {
return Ok(AuthResult::Rejected);
}
}
None => {
return Ok(AuthResult::Accepted {
None => Ok(if !valid_credentials.is_empty() {
AuthResult::Accepted {
username: user.username.clone(),
})
}
}
} else {
AuthResult::Rejected
}),
}
}

Expand Down

0 comments on commit d771fa0

Please sign in to comment.