PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS isn't respected

Tinu Weber takeya at bluewin.ch
Sat Jan 6 03:35:48 CET 2018


On Sat, Jan 06, 2018 at 02:57:30 +0100, Marek Howard wrote:
>   export PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS="'"'"`'
>
> I want to forbid '"` characters in generated passwords mostly because it
> screws up some generated configuration files. But even with this variable, I
> can still occasionally see " and ' in generated passwords.
>
> [...]
>
> I'm using `pass generate foobar` to generate passwords.

PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS is the set of characters used to
generate passwords if you pass -n, --no-symbols. So there are two things
to note here:

1. You need to pass -n or --no-symbols to pass in order for
   PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS to have any effect. The
   equivalent variable for the unlimited character set is
   PASSWORD_STORE_CHARACTER_SET.

2. You may want to specify characters you want to *keep*. Otherwise you
   will end up with passwords like these:

   ""'''``""'"`"``"````'`'"`

However, I'm not sure if there is an elegant way to have the full set of
[:graph:] as understood by tr(1) *without* the specified characters (and
without changing the code to invoke tr(1) multiple times). So my best
guess here is something like:

   PASSWORD_STORE_CHARACTER_SET='[:alnum:].,!?&*%_~$#^@{}[]()<>|=/\+-'

(note that the - should go at the end, to avoid nasty surprises)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20180106/17df576a/attachment.asc>


More information about the Password-Store mailing list