lyft / confidant

Confidant: your secret keeper. https://lyft.github.io/confidant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confidant strips newlines when submitting credentials through webpage

caedus41 opened this issue · comments

We're using Confidant to store, among other things, our certificates. When making requests between our machines we noticed that they were failing due to a SSL certificate verification error. Through some investigation, I found that the md5sum of the certificate is different after it's been sent through Confidant.

It seems like this is caused by the angular.js frontend, which I believe is stripping off newlines. I tried pasting in a value with a newline at the end, confirmed that the blank line was there after pasting, and found it to be missing when editing the credential again after saving.

I then tried to edit the value by adding newlines and noticed that the textarea class is still marked as "ng-pristine". After adding alphabetical characters, you can see that "ng-pristine" is removed and "ng-dirty" is added to the textarea class. I've pasted images below showing the three states, where the textarea has not been edited, a newline has been added but the area is still marked as pristine, and then with text added and the area marked as dirty.

For reference, we're running Confidant version 1.1.13.

image

image

image

Yep. I've reproduced this. Let me try to get a fix in.

Great! Thanks for the quick turnaround on this :)

Hm. Github auto-closed this issue. I'm releasing this as 1.10.1. I'll let you know when it's released so you can give it a try.

Ok. 1.10.1 is released on dockerhub, and pypi. There shouldn't be any breaking changes between your version and this version, so it should be safe to upgrade.

If things aren't fixed, I'll reopen the issue :)