Fix chpass-wrapper.py helper compatibility with Python 3 (#8324)

This commit is contained in:
Aleksander Machniak
2021-12-18 09:33:42 +01:00
parent 208e8ee5f4
commit d3e35df81a
2 changed files with 2 additions and 1 deletions

View File

@@ -62,6 +62,7 @@
- Fix so css files in plugins/jqueryui/themes will be minified too (#8337)
- Fix handling of unicode/special characters in custom From input (#8357)
- Fix some PHP8 compatibility issues (#8363)
- Fix chpass-wrapper.py helper compatibility with Python 3 (#8324)
## Release 1.5.1

View File

@@ -26,7 +26,7 @@ if username in BLACKLIST:
sys.exit('Changing password for user %s is forbidden (user blacklisted)' %
username)
handle = subprocess.Popen('/usr/sbin/chpasswd', stdin = subprocess.PIPE)
handle = subprocess.Popen('/usr/sbin/chpasswd', stdin = subprocess.PIPE, universal_newlines = True)
handle.communicate('%s:%s' % (username, password))
sys.exit(handle.returncode)