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

NameEncoder.decode can introduce duplicate characters per build to name-utf8.txt

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Summary
      Branch names with reserved URL characters in them, such as /, surface a bug in NameEncoder.decode(). Other characters can surface this bug too, such as ., .., and an empty space.

      It appears to only affect jobs which were migrated, back in the timeframe of JENKINS-41124. This hasn't been recreated on a "real" environment with post-41124 projects.

      Details
      With multibranch pipelines that have branch names including these reserved URL characters, such as the / in feature/branch-name, this method gets called as part of the creation of a file called name-utf8.txt, which defines the computed folders for the branch jobs containing these special characters. The bug causes this file to essentially double in size.

      The issue lies here.

        Attachments

          Issue Links

            Activity

            kshultz Karl Shultz created issue -
            kshultz Karl Shultz made changes -
            Field Original Value New Value
            Link This issue is caused by JENKINS-41124 [ JENKINS-41124 ]
            dnusbaum Devin Nusbaum made changes -
            Remote Link This issue links to "jenkinsci/branch-api-plugin#168 (Web Link)" [ 23825 ]
            kshultz Karl Shultz made changes -
            Description *Summary*
            Branch names with [reserved URL characters|https://www.w3.org/Addressing/URL/4_URI_Recommentations.html] in them, such as {{/}}, surface a bug in {{NameEncoder.decode()}}. Other characters can surface this bug too, such as {{.}}, {{..}}, and an empty space.

            *Details*
            With multibranch pipelines that have branch names including these reserved URL characters, such as the {{/}} in {{feature/branch-name}}, this method gets called as part of the creation of a file called {{name-utf8.txt}}, which defines the computed folders for the branch jobs containing these special characters. The bug causes this file to essentially double in size.

            The issue lies [here|https://github.com/jenkinsci/branch-api-plugin/blob/847348f6c741f9ac350c138d6267e41a081b89e4/src/main/java/jenkins/branch/NameEncoder.java#L209-L240].
            *Summary*
            Branch names with [reserved URL characters|https://www.w3.org/Addressing/URL/4_URI_Recommentations.html] in them, such as {{/}}, surface a bug in {{NameEncoder.decode()}}. Other characters can surface this bug too, such as {{.}}, {{..}}, and an empty space.

            It appears to only affect jobs which were migrated, back in the timeframe of [JENKINS-41124|https://issues.jenkins-ci.org/browse/JENKINS-41124]. This hasn't been recreated on a "real" environment with post-41124 projects.

            *Details*
            With multibranch pipelines that have branch names including these reserved URL characters, such as the {{/}} in {{feature/branch-name}}, this method gets called as part of the creation of a file called {{name-utf8.txt}}, which defines the computed folders for the branch jobs containing these special characters. The bug causes this file to essentially double in size.

            The issue lies [here|https://github.com/jenkinsci/branch-api-plugin/blob/847348f6c741f9ac350c138d6267e41a081b89e4/src/main/java/jenkins/branch/NameEncoder.java#L209-L240].
            kshultz Karl Shultz made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            bitwiseman Liam Newman made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              kshultz Karl Shultz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: