mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
feat: add regex support to oauth whitelist
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user