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

Adding a crumb to a WebRequest removes all existing parameters

    Details

    • Similar Issues:

      Description

      JenkinsRule.addCrumb(WebRequest req) replaces all existing parameters rather than just adding a crumb.

      This is mildly annoying, the crumb should be added to the list of parameters, not replace them.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: James Nord
            Path:
            src/main/java/org/jvnet/hudson/test/JenkinsRule.java
            http://jenkins-ci.org/commit/jenkins-test-harness/4821d0fe49f37d699a5ca294f0719f3287839eef
            Log:
            JENKINS-50590 do not remove all request parameters when adding a crumb

            If you had a WebRequest with existing Parameters specified then adding a
            crumb would remove all of those headers. THis is somewhat suprising.

            I thought about making getCrumbHeaderNVP() public but went with the
            option that should anyway cause the least suprise. The crumb is now
            added to the list of parameters rather than replacing them. It is added
            first such that if there where existing crumb fields the newly added one
            should be first.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/4821d0fe49f37d699a5ca294f0719f3287839eef Log: JENKINS-50590 do not remove all request parameters when adding a crumb If you had a WebRequest with existing Parameters specified then adding a crumb would remove all of those headers. THis is somewhat suprising. I thought about making getCrumbHeaderNVP() public but went with the option that should anyway cause the least suprise. The crumb is now added to the list of parameters rather than replacing them. It is added first such that if there where existing crumb fields the newly added one should be first.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: James Nord
            Path:
            src/main/java/org/jvnet/hudson/test/JenkinsRule.java
            http://jenkins-ci.org/commit/jenkins-test-harness/100cc61aa3d066f7762a5f642638ed495a36108d
            Log:
            JENKINS-50590 do not remove all request parameters when adding a crumb

            Handle the crumb in a query string as well as a Form.
            No longer checks existing parameters are empty as addAll will do that.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/100cc61aa3d066f7762a5f642638ed495a36108d Log: JENKINS-50590 do not remove all request parameters when adding a crumb Handle the crumb in a query string as well as a Form. No longer checks existing parameters are empty as addAll will do that.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jvnet/hudson/test/JenkinsRule.java
            http://jenkins-ci.org/commit/jenkins-test-harness/23e497bfa9d729e4aecea5626cd4899ea8fa690a
            Log:
            Merge pull request #97 from jtnord/JENKINS-50590

            JENKINS-50590 do not remove all request parameters when adding a crumb

            Compare: https://github.com/jenkinsci/jenkins-test-harness/compare/4ffe0003b57f...23e497bfa9d7

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/23e497bfa9d729e4aecea5626cd4899ea8fa690a Log: Merge pull request #97 from jtnord/ JENKINS-50590 JENKINS-50590 do not remove all request parameters when adding a crumb Compare: https://github.com/jenkinsci/jenkins-test-harness/compare/4ffe0003b57f...23e497bfa9d7
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/plugin-pom/45c3ffaa5eceddc25ffdf0eab7850ac34c902701
            Log:
            [JENKINS-50598,JENKINS-50590] - Update JTH to 2.38

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/plugin-pom/45c3ffaa5eceddc25ffdf0eab7850ac34c902701 Log: [JENKINS-50598,JENKINS-50590] - Update JTH to 2.38
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/plugin-pom/539cbe295a6782f6cde65cdf7962e6dbb07defb1
            Log:
            Merge pull request #102 from oleg-nenashev/jth/2.38

            [JENKINS-50598,JENKINS-50590] - Update JTH to 2.38

            Compare: https://github.com/jenkinsci/plugin-pom/compare/624a61e2d84b...539cbe295a67

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/plugin-pom/539cbe295a6782f6cde65cdf7962e6dbb07defb1 Log: Merge pull request #102 from oleg-nenashev/jth/2.38 [JENKINS-50598,JENKINS-50590] - Update JTH to 2.38 Compare: https://github.com/jenkinsci/plugin-pom/compare/624a61e2d84b...539cbe295a67

              People

              • Assignee:
                teilo James Nord
                Reporter:
                teilo James Nord
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: