diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-11 09:08:11 +0100 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-11 14:57:49 +0100 |
commit | 5763af8cbe7e2ad35a1eb336e77a6fe74ac2534e (patch) | |
tree | d4a002d9b497ada75cec6cc679d8ed1d7dd84ceb /python | |
parent | 67908a87781042b5f6f9ae14d588bd34b0cbe1a8 (diff) | |
download | vyos-1x-5763af8cbe7e2ad35a1eb336e77a6fe74ac2534e.tar.gz vyos-1x-5763af8cbe7e2ad35a1eb336e77a6fe74ac2534e.zip |
util: T2226: prevent string over bytes for input
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/authutils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/authutils.py b/python/vyos/authutils.py index 90a46ffb4..66b5f4a74 100644 --- a/python/vyos/authutils.py +++ b/python/vyos/authutils.py @@ -22,7 +22,7 @@ def make_password_hash(password): """ Makes a password hash for /etc/shadow using mkpasswd """ mkpassword = 'mkpasswd --method=sha-512 --stdin' - return cmd(mkpassword, input=password.encode(), timeout=5) + return cmd(mkpassword, input=password, timeout=5) def split_ssh_public_key(key_string, defaultname=""): """ Splits an SSH public key into its components """ |