feat: add regex support to oauth whitelist

This commit is contained in:
Stavros
2025-04-18 19:36:50 +03:00
parent 34b1c97db0
commit 85ad0d19c7
7 changed files with 7 additions and 27 deletions

View File

@@ -288,7 +288,7 @@ func ParseSecretFile(contents string) string {
// Check if a string matches a regex or a whitelist
func CheckWhitelist(whitelist string, str string) bool {
// Check if the whitelist is empty
if len(whitelist) == 0 {
if len(strings.TrimSpace(whitelist)) == 0 {
return true
}