Linux 密码管理器修剪密码中的尾随空格
Linux password manager trims trailing spaces in passwords
我非常同意 those two 关于密码中空格的哲学:它们应该是可能的,并且责任留给用户。
但是 linux 本机 Password Store
实用程序环绕 gpg
,trim 前导和尾随空格:
$ pass insert test
Enter password for test: wrapped <Enter>
Retype password for test: wrapped <Enter>
$ pass test
wrapped|--------> well.. naked.
这只是可自定义的默认行为吗?
我该如何解决这个问题?
问题是脚本获取密码by running the read
builtin. By default, this builtin 。
这可以通过在使用 read
之前清除 IFS
环境变量来解决。
因此,如果需要,您必须手动编辑 shell 脚本以清除 IFS
(您还需要在第 447 行引用 $password
)上班。
我非常同意 those two 关于密码中空格的哲学:它们应该是可能的,并且责任留给用户。
但是 linux 本机 Password Store
实用程序环绕 gpg
,trim 前导和尾随空格:
$ pass insert test
Enter password for test: wrapped <Enter>
Retype password for test: wrapped <Enter>
$ pass test
wrapped|--------> well.. naked.
这只是可自定义的默认行为吗?
我该如何解决这个问题?
问题是脚本获取密码by running the read
builtin. By default, this builtin
这可以通过在使用 read
之前清除 IFS
环境变量来解决。
因此,如果需要,您必须手动编辑 shell 脚本以清除 IFS
(您还需要在第 447 行引用 $password
)上班。