Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #8228

Closed
Open
Created Nov 03, 2014 by Administrator@rootOwner

Wrong redirect after login with relative url root

Created by: simonswine

Hallo,

I recently noticed a bug during login. If I login successfully after an a failed login attempt, I get redirected to the wrong url. This url contains the relative_url_root twice. If i enter my login credentials right in the first place everything is as it's expected to be.

  • case 1: Successful login after failed one
  • case 2: Successful login in the first place

My Gitlab setup uses:

  • Gitlab 7-4-stable branch
  • Ruby 2.0
  • relative_url_root = /gitlab
  • gitlab:check / gitlab:info shows no errors

What i've done so far:

  • compared the HTML DOM and the HTTP request of the successfull attempts for each case: they're identical.
  • checked the log files output:
# case 1
Started POST "/gitlab/users/sign_in" for 127.0.0.1 at 2014-11-03 13:57:41 +0100
Processing by SessionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"YY", "user"=>{"login"=>"user", "password"=>"[FILTERED]", "remember_me"=>"0"}}
Redirected to https://domain/gitlab/gitlab/users/sign_in

# case 2
Started POST "/gitlab/users/sign_in" for 127.0.0.1 at 2014-11-03 13:57:06 +0100
Processing by SessionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"YY", "user"=>{"login"=>"user", "password"=>"[FILTERED]", "remember_me"=>"0"}}
Redirected to https://domain/gitlab/users/sign_in

As we can see in the logs there is a wrong redirect for case 1 coming from the server side. I looked a bit into gitlab's code, but I'm not very familiar with the devise gem. Maybe someone can give me a hint were to look deeper into it.

Thanks, simonswine

Assignee
Assign to
Time tracking