You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
hash_password tool does not work without a tty, i.e. when stdin is not bound to a tty. Looks like it is some python input locale stuff - I do not know much about it. In the example below you can see that locale variable is set, but when it is run with input from /dev/null, it fails until I set PYTHONIOENCODING variable.
matrix@server ~ $ cd synapse
matrix@server ~/synapse $ . bin/activate
(synapse)matrix@server ~/synapse $ env | grep LANG
LANG=en_US.utf8
(synapse)matrix@server ~/synapse $ hash_password -c homeserver.yaml -p test
$2b$12$nM4g1fpajQfDHLE1xfWSGeXloe6BfJgFg7fcyVjOnv/Temq.hQ1xK
(synapse)matrix@server ~/synapse $ hash_password -c homeserver.yaml -p test </dev/null
Traceback (most recent call last):
File "/home/matrix/synapse/bin/hash_password", line 65, in <module>
password = password.decode(sys.stdin.encoding)
TypeError: decode() argument 1 must be string, not None
(synapse)matrix@server ~/synapse $ PYTHONIOENCODING=UTF-8 hash_password -c homeserver.yaml -p test </dev/null
$2b$12$tYUTBs3gf3Tj6mQR.RFigerXqyyBYeHRehefsFPaSILbPXmOE5Esu
The text was updated successfully, but these errors were encountered:
hash_password tool does not work without a tty, i.e. when stdin is not bound to a tty. Looks like it is some python input locale stuff - I do not know much about it. In the example below you can see that locale variable is set, but when it is run with input from /dev/null, it fails until I set PYTHONIOENCODING variable.
The text was updated successfully, but these errors were encountered: