forked from Mirrors/oauth2
tweak regex filters
This commit is contained in:
parent
55a616b083
commit
844e38f109
|
@ -58,16 +58,18 @@ type Config struct {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
validTokenURLPatterns = []*regexp.Regexp{
|
validTokenURLPatterns = []*regexp.Regexp{
|
||||||
regexp.MustCompile("https://[^\\.]+\\.sts\\.googleapis\\.com"),
|
// The complicated part in the middle matches any number of characters that
|
||||||
regexp.MustCompile("https://sts\\.googleapis\\.com"),
|
// aren't period, spaces, or slashes.
|
||||||
regexp.MustCompile("https://sts\\.[^\\.]+\\.googleapis\\.com"),
|
regexp.MustCompile("^https://[^\\.\\s\\/\\\\]+\\.sts\\.googleapis\\.com"),
|
||||||
regexp.MustCompile("https://[^\\.]+-sts\\.googleapis\\.com"),
|
regexp.MustCompile("^https://sts\\.googleapis\\.com"),
|
||||||
|
regexp.MustCompile("^https://sts\\.[^\\.\\s\\/\\\\]+\\.googleapis\\.com"),
|
||||||
|
regexp.MustCompile("^https://[^\\.\\s\\/\\\\]+-sts\\.googleapis\\.com"),
|
||||||
}
|
}
|
||||||
validImpersonateURLPatterns = []*regexp.Regexp{
|
validImpersonateURLPatterns = []*regexp.Regexp{
|
||||||
regexp.MustCompile("https://[^\\.]+\\.iamcredentials\\.googleapis\\.com"),
|
regexp.MustCompile("^https://[^\\.\\s\\/\\\\]+\\.iamcredentials\\.googleapis\\.com"),
|
||||||
regexp.MustCompile("https://iamcredentials\\.googleapis\\.com"),
|
regexp.MustCompile("^https://iamcredentials\\.googleapis\\.com"),
|
||||||
regexp.MustCompile("https://iamcredentials\\.[^\\.]+\\.googleapis\\.com"),
|
regexp.MustCompile("^https://iamcredentials\\.[^\\.\\s\\/\\\\]+\\.googleapis\\.com"),
|
||||||
regexp.MustCompile("https://[^\\.]+-iamcredentials\\.googleapis\\.com"),
|
regexp.MustCompile("^https://[^\\.\\s\\/\\\\]+-iamcredentials\\.googleapis\\.com"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue