Skip to content

Redirect to activity page when accepting invitation doesn't handle relative URL properly

Summary

US Fed Customer has instance configured to use a relative URL. When invitation links are sent to users to sign up, the decoded url renders a 404, and has doubled the relative portion of the url. (e.g. http://gitlab.domain/gitlab//gitlab/subgroup-1/test-project-4202/activity)

Discussed in: this confidential request for help issue

Steps to reproduce

With an instance configured for relative url:

(Sign-up restrictions: sign-up disabled)

1. Invite non-existent user to group/project-name
2. User clicks link in email, required to sign-in to accept invite
3. Admin creates user account for user
4. User signs-in, double relative URL context issue occurs with 404 result
5. User clicked invite link again, while signed-in, invite is successful

Example Project

What is the current bug behavior?

Invitation emails link to non-existent page

What is the expected correct behavior?

Invitation email links to a page that exists

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Likely introduced by this MR

Edited by Wade Jenkins