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

parse web CLI input as shell input #7206

Merged
merged 5 commits into from
Aug 1, 2019
Merged

parse web CLI input as shell input #7206

merged 5 commits into from
Aug 1, 2019

Conversation

meirish
Copy link
Contributor

@meirish meirish commented Jul 29, 2019

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

@meirish meirish requested a review from a team July 29, 2019 15:05
@meirish meirish added this to the 1.2.1 milestone Jul 29, 2019
//'"',
"'",
'"',
//"'",
Copy link
Contributor

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?

Copy link
Contributor Author

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 '.

Copy link
Contributor

@andaley andaley left a 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!

@meirish meirish merged commit 0a4f3bf into master Aug 1, 2019
@meirish meirish deleted the b-web-cli-moar-shell branch August 1, 2019 22:12
@jefferai jefferai removed this from the 1.2.1 milestone Aug 5, 2019
meirish added a commit that referenced this pull request Aug 5, 2019
* 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
meirish added a commit that referenced this pull request Aug 5, 2019
* 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
@chrishoffman chrishoffman added this to the 1.2.1 milestone Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres create_statement string not saved properly during database role creation in browser CLI
4 participants