[JIRA] (JENKINS-59756) NameEncoder.decode can introduce duplicate characters per build to name-utf8.txt

7 views
Skip to first unread message

kshultz@cloudbees.com (JIRA)

unread,
Oct 11, 2019, 4:53:02 PM10/11/19
to jenkinsc...@googlegroups.com
Karl Shultz created an issue
 
Jenkins / Bug JENKINS-59756
NameEncoder.decode can introduce duplicate characters per build to name-utf8.txt
Issue Type: Bug Bug
Assignee: Unassigned
Components: branch-api-plugin
Created: 2019-10-11 20:52
Priority: Critical Critical
Reporter: Karl Shultz

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.

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

kshultz@cloudbees.com (JIRA)

unread,
Oct 11, 2019, 5:05:03 PM10/11/19
to jenkinsc...@googlegroups.com
Karl Shultz updated an issue
Change By: Karl Shultz
*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@cloudbees.com (JIRA)

unread,
Oct 17, 2019, 3:25:02 PM10/17/19
to jenkinsc...@googlegroups.com
Karl Shultz started work on Bug JENKINS-59756
 
Change By: Karl Shultz
Status: Open In Progress

bitwiseman@gmail.com (JIRA)

unread,
Feb 10, 2020, 7:21:02 PM2/10/20
to jenkinsc...@googlegroups.com
Liam Newman resolved as Fixed
Change By: Liam Newman
Status: In Progress Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages