-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Feature] Allow again file name with spaces for "--add-ca" and treat them correctly #2647
Comments
Hi @muralito , |
Not as easy to fix as I thought it would be |
Don't worry. Just put a warning in the docs and don't fix it (unless is security related)... |
It's potentially security related (see tag), at least when people can supply this option via web interface or so -- which OTOH and IMO doesn't seem very likely. A fix would be easy if I could remove a feature like not supplying multiple comma separated CAs. I was sitting the other night over this (bad moment anyway) and was scratching my head how to do that properly. |
.... by forbidding spaces in supplied CA files/directories Also now we're sanitizing the cmd line parameter better `using safe_echo()` See also #2647 .
.... by forbidding spaces in supplied CA files/directories Also now we're sanitizing the cmd line parameter better using `safe_echo()` See also #2647 .
For now I just implemented input validation which does not allow spaces in those file names. On the long run this should be improved to allow also files with spaces -- thus I am leaving this open -- but there are other priorities here. |
Before you open an issue please check which version you are running and whether it is the latest in stable / dev branch
I am running version 3.0.8 from https://testssl.sh/
Before you open an issue please whether this is a known problem by searching the issues
I couldn't find anything related to filename with spaces
Command line / docker command to reproduce
testssl.sh --add-ca /etc/pki/trust/anchors/SPACE\ IN\ NAME.crt https://server
Fatal error: CA file "/etc/pki/trust/anchors/SPACE" does not exist
Expected behavior
Accept the filename with spaces as any other filename.
Your system (please complete the following information):
Additional context
Renaming the CA file to a filename without spaces solves the issue, but I reported anyway because the issue could hide another problem.
The text was updated successfully, but these errors were encountered: