feat(op): allow double star globs (#507)
Related to https://github.com/zitadel/zitadel/issues/5110
This commit is contained in:
parent
dce79a73fb
commit
c37ca25220
8 changed files with 374 additions and 2 deletions
|
@ -7,10 +7,10 @@ import (
|
|||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/bmatcuk/doublestar/v4"
|
||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
||||
str "github.com/zitadel/oidc/v3/pkg/strings"
|
||||
|
@ -283,7 +283,7 @@ func checkURIAgainstRedirects(client Client, uri string) error {
|
|||
}
|
||||
if globClient, ok := client.(HasRedirectGlobs); ok {
|
||||
for _, uriGlob := range globClient.RedirectURIGlobs() {
|
||||
isMatch, err := path.Match(uriGlob, uri)
|
||||
isMatch, err := doublestar.Match(uriGlob, uri)
|
||||
if err != nil {
|
||||
return oidc.ErrServerError().WithParent(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue