Commit 9eb56f55 authored by Rafael Monnerat's avatar Rafael Monnerat

generate.password: Strip new lines from the password file

  If the password file is overwriten by a third part application,
  an wrong n can be added to the file. The change on this recipe
  allow us automatically fix this miss behaviour.
parent 152f9cd0
......@@ -120,7 +120,7 @@ class Password(object):
if not passwd:
passwd = self.generatePassword(int(options_get('bytes', '8')))
self.update = self.install
self.passwd = passwd
self.passwd = passwd.strip('\n')
# Password must not go into .installed file, for 2 reasons:
# security of course but also to prevent buildout to always reinstall.
options.get = lambda option, *args, **kw: passwd \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment