Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64991

Login redirect to previous page no longer works

    • 2.296

      When logging in, the "from" URL is no longer being redirected to.

      1. docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:2.265
      2. Pass the setup wizard not installing anything, keep admin user.
      3. In /configureSecurity, allow anonymous read access
      4. As anonymous, go to http://localhost:8080/view/all/builds
      5. Click log in
      6. Log in as admin

      Expected result (up to 2.265): Back to Build History

      Actual result (from 2.266): Index page

      This is a regression, probably caused by https://github.com/jenkinsci/jenkins/blob/9cf3f73abdeddf360f67d98577a15b8cb0dc4162/core/src/main/java/hudson/security/AuthenticationProcessingFilter2.java#L61-L96

          [JENKINS-64991] Login redirect to previous page no longer works

          Daniel Beck added a comment -

          jglick I think there's a difference between this as described, and the redirect from an Unauthorized response. I think the latter still works.

          Daniel Beck added a comment - jglick I think there's a difference between this as described, and the redirect from an Unauthorized response. I think the latter still works.

          Jesse Glick added a comment -

          I see, this is about a page on which you had a 200 status but decided to log in anyway.

          Jesse Glick added a comment - I see, this is about a page on which you had a 200 status but decided to log in anyway.

          Daniel Beck added a comment -

          Yes, step 3 in the reproduction is important. Without it (and consequently without step 5, you just get redirected to the login form), the redirect still works in 2.266.

          Daniel Beck added a comment - Yes, step 3 in the reproduction is important. Without it (and consequently without step 5, you just get redirected to the login form), the redirect still works in 2.266.

          Daniel Beck added a comment -

          ci.jenkins.io was updated to 2.277.1 and it's incredibly annoying. I'm not triggering PR builds through that UI anymore.

          1. Click on a PR status
          2. Go to the build info
          3. Click Blue Ocean login link
          4. Log in
          5. Get forwarded to home page

          Daniel Beck added a comment - ci.jenkins.io was updated to 2.277.1 and it's incredibly annoying. I'm not triggering PR builds through that UI anymore. Click on a PR status Go to the build info Click Blue Ocean login link Log in Get forwarded to home page

          Tim Jacomb added a comment -

          clicking re-run from the checks page is probably quicker than that anyway

          Tim Jacomb added a comment - clicking re-run from the checks page is probably quicker than that anyway

          Daniel Beck added a comment -

          clicking re-run from the checks page is probably quicker than that anyway

          Not possible in jenkins-infra/update-center2

          Daniel Beck added a comment - clicking re-run from the checks page is probably quicker than that anyway Not possible in jenkins-infra/update-center2

          Basil Crow added a comment -

          One of my users reported this issue after we upgraded from 2.263.4 to 2.277.3.

          Basil Crow added a comment - One of my users reported this issue after we upgraded from 2.263.4 to 2.277.3.

          Daniel Beck added a comment -

          https://github.com/jenkinsci/jenkins/pull/5461 as a start, unsure whether I'll find the time to finish in the next few weeks though.

          Daniel Beck added a comment - https://github.com/jenkinsci/jenkins/pull/5461 as a start, unsure whether I'll find the time to finish in the next few weeks though.

          It's particularly irksome if you allow anonymous browsing to review the status of your jobs, and need to log in to do a build or update an option.

          Nico Kadel-Garcia added a comment - It's particularly irksome if you allow anonymous browsing to review the status of your jobs, and need to log in to do a build or update an option.

          Tim Jacomb added a comment -

          The fix is merged and will be released next week

          Tim Jacomb added a comment - The fix is merged and will be released next week

            danielbeck Daniel Beck
            danielbeck Daniel Beck
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: