-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make static clients' RedirectURIs to be regular expressions #1220
Conversation
92cee75
to
726e471
Compare
@@ -25,6 +26,9 @@ type staticClientsStorage struct { | |||
func WithStaticClients(s Storage, staticClients []Client) Storage { | |||
clientsByID := make(map[string]Client, len(staticClients)) | |||
for _, client := range staticClients { | |||
if re, err := regexp.Compile("^" + strings.Join(client.RedirectURIs, "|") + "$"); err == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regexp built here is missing a caption group over the joined RedirectURIs
causing it to match two concatenated URIs.
Given two RedirectURIs http://foo.com
and http://bar.com
the compiled regex would look like
^http://foo.com|http.bar.com$
and it would match
http://foo.comhttp://bar.com
which doesn't look right to me.
Instead the regexp should look like ^(http://foo.com|http://bar.com)$
Any news for this feature? |
Is there any chance this will ever be merged? It would be extremely useful. |
This would be a useful feature. In addition to google / azure supporting wildcards as discussed in #448, auth0 also has wildcard support. |
bump |
@fbsb Can you look on it please? |
Anyone have any luck on this? |
I am not using dex anymore. If anyone is interested and thinking it is salvageable use this branch to open new PR rebased & refined. |
No description provided.