Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Trim whitespace on text entry fields #27

Open
woldie opened this issue Dec 7, 2017 · 0 comments
Open

Trim whitespace on text entry fields #27

woldie opened this issue Dec 7, 2017 · 0 comments

Comments

@woldie
Copy link

woldie commented Dec 7, 2017

Version: v1.6.0 (in test)

Problem: There is no valid usecase for leading or trailing whitespace. If some wiseguy says there is, then please kindly pull them aside to inform them they are wrong. :) Seriously though, it's surprising when we get secrets with spaces because things break mysteriously. And consider there's bound to be a lot of copy-pasta going on with data entry to the app, and users will occasionally paste spurious whitespace surrounding their text into the fields.

To repro: Go to vault, click "Add Key Value Pair", put leading and trailing whitespace (tabs and spaces) at front and rear of your new key and value string. Click save.

Expected: trim leading and trailing whitespace on values and keys prior to string validation and submission to the server. In other apps, I've seen this kind of trim happen upon clicking save.

Extra credit: it looks like I can make a key and value that are purely whitespace and save that successfully. When you trim, it should not let me save and treat the key/value as if I had tried to save with a blank field.

Are there other places that need this kind of evil user text entry sanitizing TLC? I dunno, I haven't tested exhaustively. I see that when I create a permission, I could make an "IAM Principal ARN" with trailing tab characters, and that's going to break things.

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

No branches or pull requests

2 participants