-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL encode directory names in "all files in zip" link #10084
base: master
Are you sure you want to change the base?
Conversation
Previously, directory names containing special characters (e.g., "[" or "]") would cause HTTP 400 errors due to illegal path characters. Now properly percent-encoding the directory name in the URL to handle special characters. Signed-off-by: Kefu Chai <[email protected]>
Yay, your first pull request towards Jenkins core was created successfully! Thank you so much! |
@@ -114,7 +114,7 @@ THE SOFTWARE. | |||
<tr> | |||
<td style="text-align:right;" colspan="3"> | |||
<div style="margin-top: 1em;"> | |||
<a class="jenkins-link--with-icon" href="${backPath}${pattern!=''?pattern+'/':''}*zip*/${dir.name}.zip"> | |||
<a class="jenkins-link--with-icon" href="${backPath}${pattern!=''?pattern+'/':''}*zip*/${h.urlEncode(dir.name)}.zip"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do spaces in the directory names still work?
We had a similar issue in the junit plugin and rawEncode
had to be used instead of urlEncode
jenkinsci/junit-plugin#660 (comment)
and finally:
jenkinsci/junit-plugin#668
Could you please include how its been tested in the testing done, including the cases you've tried |
Hi Tim Thank you very much for your detailed insights and review. I haven't had the chance to properly test the changes yet. I will set up a local environment to verify the behavior you've described. Since I'm not very familiar with Jenkins development and its setup process, it may take me some time to complete the testing. I'll update this PR once I've had a chance to verify everything locally. |
Previously, directory names containing special characters (e.g., "[" or "]") would cause HTTP 400 errors due to illegal path characters. Now properly percent-encoding the directory name in the URL to handle special characters.
See JENKINS-XXXXX.
Testing done
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist