Skip to content
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

Use host header for successful OAuth redirect (3.7) #6220

Merged
merged 1 commit into from
Apr 25, 2017

Conversation

hmhealey
Copy link
Member

This is to keep GitLab SSO working when the SiteURL isn't configured

Checklist

  • Touches critical sections of the codebase (auth, upgrade, etc.)

@hmhealey hmhealey added the 2: Dev Review Requires review by a developer label Apr 24, 2017
@hmhealey hmhealey added this to the v3.7.0 milestone Apr 24, 2017
@@ -271,7 +271,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {

state := r.URL.Query().Get("state")

uri := c.GetSiteURL() + "/signup/" + service + "/complete"
uri := c.GetSiteURLHeader() + "/signup/" + service + "/complete"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need on line 706 as well I believe

Copy link
Member Author

@hmhealey hmhealey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwilander Fixed and I changed it everywhere else in that file that it was using GetSiteURL to redirect the user

@esethna esethna requested a review from coreyhulen April 24, 2017 21:02
@coreyhulen coreyhulen added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a developer labels Apr 24, 2017
@grundleborg grundleborg merged commit 691c181 into release-3.7 Apr 25, 2017
@grundleborg grundleborg deleted the siteurlheader-37 branch April 25, 2017 07:30
@esethna esethna added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Done Required release tests have been written labels Apr 27, 2017
danmaas added a commit to spinpunch/battlehouse-mattermost that referenced this pull request Sep 8, 2017
* commit '51cdce09634cd30ce9e23095c86ddc9f680671d7': (37 commits)
  Email fix
  Update channel header
  Minor fix
  Fixed detection of HTTPS without a proxy (mattermost#6232)
  Use host header for successful OAuth redirect (mattermost#6220)
  Invite salt fix for 3.8 (mattermost#6149)
  PLT-6368 Changed client to always use window.location.origin over SiteURL (3.7) (mattermost#6191)
  PLT-5900 Removed automatic configuration of Site URL (mattermost#6135)
  Fix configuration setting
  PLT-5702 Added special error page for private browsing error message (mattermost#5985) (mattermost#6023)
  PLT-6207: Fix EE policy application. (mattermost#5997)
  PLT-5905 Fix saml certificates for 3.7 (mattermost#5843)
  Fix telemetry. (mattermost#5841)
  Fxing some unit tests
  PLT-5943 Reduce minimum username length (mattermost#5798)
  Fix policy application in team edition. (mattermost#5771)
  PLT-5804 Fix email blue error not showing up (mattermost#5749)
  Fix permalink in email for DMs/GMs (mattermost#5751)
  Report correct session for React Native app (mattermost#5734)
  PLT-5800 Cleaned up duplicated code for adding slack attachments to posts (mattermost#5711)
  ...

# Conflicts:
#	api/post.go
#	app/channel.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Done Required release tests have been written
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants