zalando / go-keyring

Cross-platform keyring interface for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Umlaut passwords fail to decode correctly on MacOS

opened this issue · comments

#60 adds a test case for this. I'm unsure how this should be fixed correctly while maintaining the best possible backward compatibility. Options that came to mind:

  • check for non-ascii characters and encode them all
  • simply encode all passwords on MacOS

I happily implement but would request some guidance on which direction it should be.

simply encode all passwords on MacOS

This seems to me the simplest solution. I would add some kind of prefix to the password e.g. encoded: such that you know whether to decode it or not when getting the password from the store. This would ensure that passwords stored before this change could still be read from the store without any issues (e.g. those would not be decoded).

The encoding on newline was already there. I just made it the default for all passwords and pushed the change to #60, which needs approval for the full tests to be run.

fixed in #60