diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b9213904..1fba17eb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/plugins/password/helpers/chpass-wrapper.py b/plugins/password/helpers/chpass-wrapper.py index e56811561..b3f81eb89 100644 --- a/plugins/password/helpers/chpass-wrapper.py +++ b/plugins/password/helpers/chpass-wrapper.py @@ -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)