Skip to content
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

upload file throw exception when file name contains special char #3408

Closed
ttbadr opened this issue Aug 17, 2021 · 2 comments · Fixed by #3530
Closed

upload file throw exception when file name contains special char #3408

ttbadr opened this issue Aug 17, 2021 · 2 comments · Fixed by #3530

Comments

@ttbadr
Copy link
Contributor

ttbadr commented Aug 17, 2021

when I upload a file with a special file name, it will throw exception.
the file name is 001_special_!@#\$^&(.mp4

I do some research, in the PodUpload.uploadFile:

  final String file = context.getFile();
  final String command = String.format("mkdir -p %s && base64 -d - > %s", directory, file);

I think the file should be escaped for special char with commons-text StringEscapeUtils.escapeXSI

@rohanKanojia
Copy link
Member

@ttbadr : Thanks for your bug report. Would you like to submit a PR to fix this?

@ttbadr
Copy link
Contributor Author

ttbadr commented Aug 17, 2021

@rohanKanojia OK

shawkins added a commit to shawkins/kubernetes-client that referenced this issue Oct 13, 2021
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Oct 13, 2021
manusa pushed a commit that referenced this issue Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants