[Freeipa-devel] [PATCH] Use SystemRandom for better random passwords

Rob Crittenden rcritten at redhat.com
Mon Aug 11 20:20:38 UTC 2008


Simo Sorce wrote:
> On Fri, 2008-08-08 at 15:42 -0400, Simo Sorce wrote:
>> On Fri, 2008-08-08 at 14:47 -0400, Rob Crittenden wrote:
>>> Simo Sorce wrote:
>>>> While reviewing some code I realized we could do a better job at
>>>> generating random password (and this was already implemented for one of
>>>> our functions).
>>>> The current code is *not* flawed, but using better methods is always a
>>>> good thing.
>>> ack but looks like you can remove the 'generator = 
>>> random.SystemRandom()' as well.
>> arghh no, thanks for point this out because the bug is that the last
>> line should look like:
>>
>> +            password += generator.choice(password_chars)
>>
>> and NOT
>>
>> +            password += r.choice(password_chars)
>>
>> bloody copy&paste errors :-)
> 
> New patch fixing this.
> 
> Simo.

ack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20080811/1f41b9d5/attachment.bin>


More information about the Freeipa-devel mailing list