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

web UI fails to list secrets when the path contains a #*+[(\ character #6282

Closed
dupainaulevain opened this issue Feb 22, 2019 · 7 comments
Closed
Labels

Comments

@dupainaulevain
Copy link

dupainaulevain commented Feb 22, 2019

Describe the bug

the web UI fails to list secrets when a component of the path contains a #*+[(\ character

  • #some is not properly escaped and is a URL fragment
  • *some empty list, no secret displayed
  • +some empty list, no secret displayed
  • [some empty list, no secret displayed
  • (some empty list, no secret displayed
  • \some is incorrectly translated into /some

To Reproduce

Steps to reproduce the behavior, using a live Vault server (not the -dev because the workaround will redirect to the page asking for the token) and the open parenthesis.

1

  • click on the link to (some

2

  • the secret (2) is not displayed

Expected behavior

The secret is displayed

Workaround

  • manually replace ( with %28 in the URL

3

  • the secret is displayed (notice the %28 in the page)

4

Environment:

Vault Server Version Vault v1.0.2
Vault CLI Version Vault v1.0.2 ('37a1dc9c477c1c68c022d2084550f25bf20cac33')
Server Operating System/Architecture: Debian GNU/Linux stretch amd64
@dupainaulevain dupainaulevain changed the title web UI fails to list secrets that contain a open parenthesis web UI fails to list secrets when the path contains a open parenthesis Feb 22, 2019
@singuliere
Copy link

singuliere commented Feb 22, 2019

I'm not sure why it would only create a problem with the open parenthesis. There probably is a range of characters that trigger the same bug.

@singuliere
Copy link

singuliere commented Feb 22, 2019

for c in \( \! \" \# \$ \& \' \* \+ \, \@ \`  \{ \| \} \~ \[ \\ \] \^ \_ ; do vault kv put "secret/${c}some/2" 3=4 ; done

and trying each link shows:

  • #some is not properly escaped and is a URL fragment
  • *some empty list, no secret displayed
  • +some empty list, no secret displayed
  • [some empty list, no secret displayed
  • (some empty list, no secret displayed
  • \some is incorrectly translated into /some

@dupainaulevain dupainaulevain changed the title web UI fails to list secrets when the path contains a open parenthesis web UI fails to list secrets when the path contains a #*+[(\ character Feb 22, 2019
singuliere added a commit to singuliere/vault-keepass-import that referenced this issue Feb 22, 2019
@meirish meirish added the ui label Feb 22, 2019
@singuliere
Copy link

@meirish is this considered a bug? I'm not familiar with how labels are assigned :-)

@meirish
Copy link
Contributor

meirish commented Feb 27, 2019

@singuliere Yep, the linked PR (#6294) fixes it - just got around to checking it out yesterday. @dupainaulevain thanks for the report - I think we've also fixed it in a few other places in the UI as well.

@singuliere
Copy link

@meirish excellent,thanks!

@dupainaulevain
Copy link
Author

@meirish do you think vault kv list fails when a path component has a trailing white space has the same root cause as this issue?

@meirish
Copy link
Contributor

meirish commented Feb 27, 2019

@dupainaulevain no they are separate, it looks like there's a PR with some discussion linked on that issue, I believe that behavior is intentional (and the UI mimics it in the web CLI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants