Commits

Jason R. Coombs committed 7b828ab

no need to double-encode the password

Comments (0)

Files changed (1)

jaraco/site/controllers.py

 
 		class userstr(str): pass
 		if length:
-			newpass = auth.PasswordGenerator.make_password(int(length), encoding=None)
+			newpass = auth.PasswordGenerator.make_password(int(length),
+				encoding=None)
 			password = userstr(binascii.b2a_hex(newpass))
 			password.alternatives = []
 			for encoding in ('base-64',):
-				encoded, newlen = codecs.getencoder(encoding)(password)
+				encoded, newlen = codecs.getencoder(encoding)(newpass)
 				password.alternatives.append((encoded, encoding))
 		else:
 			length = 8