Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

user-configured redirect URL clobbered in oauthproxy.go #677

Open
dt-rush opened this issue Dec 6, 2018 · 5 comments
Open

user-configured redirect URL clobbered in oauthproxy.go #677

dt-rush opened this issue Dec 6, 2018 · 5 comments

Comments

@dt-rush
Copy link

dt-rush commented Dec 6, 2018

see line 55 of oauthproxy.go (link)

We literally overwrite whatever the value is with fmt.Sprintf("%s/callback", opts.ProxyPrefix) even if the user provided a redirect URL they want to use.

@dt-rush dt-rush changed the title user-configured redirect URL clobbered in oauth2_proxy.go user-configured redirect URL clobbered in oauthproxy.go Dec 6, 2018
@dt-rush
Copy link
Author

dt-rush commented Dec 6, 2018

This PR will be sent to pusher's fork since this repo is abandoned by bitly ( see #628 )

@ploxiln
Copy link
Contributor

ploxiln commented Dec 6, 2018

I think the reason for the current behavior, is to allow the option to set the scheme://domain, but the path should be known by oauth2_proxy pretty well, so it overwrites just the path.

@ploxiln
Copy link
Contributor

ploxiln commented Dec 6, 2018

(agreed it's a odd to ignore the path in the option, maybe it's trying to silently fix mistakes in a manually set callback url path)

@dt-rush
Copy link
Author

dt-rush commented Dec 7, 2018

As far as I see it, the user specifying a callback URL should specify the callback URL, not the callback scheme://domain.

@dt-rush
Copy link
Author

dt-rush commented Dec 8, 2018

Actually there are more problems here in any case. OAuthCallbackPath is used to handle the callback, not RedirectURL... these are supposed to mean the same thing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants