-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
parse web CLI input as shell input #7206
Conversation
//'"', | ||
"'", | ||
'"', | ||
//"'", |
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.
why'd you skip this test?
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.
We had previously skipped both of them because they weren't supported in the web CLI - we do use those values for manual input into the regular KV ui below though. With this change we could do "
because we now require that you quote the whole path. But we're quoting the path with '
which doesn't work when the path also contains '
.
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.
one question, but looks good to me!
* add shell quote * use shell quote's parse method to properly escape strings entered in the web cli * add and update tests for the web CLI * fix linting and skip test for ' in a path * skip the correct test
The goal with the web CLI is to have it be compatible with some low level vault CLI commands, but there have been instances of users assuming this compatibility and the implementation falling short. The major case where this has surfaced is escaping shell characters, so this PR adds shell-quote to remedy that.
Previously the web CLI allowed use of unquoted shell characters in paths - quoting them is now required.
Fixes #7156 and #6227