[Freeipa-devel] [PATCH] Use SystemRandom for better random passwords
Simo Sorce
ssorce at redhat.com
Fri Aug 8 19:42:03 UTC 2008
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-larger-set-from-which-to-choose-chars-for-random.patch
Type: application/mbox
Size: 1623 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20080808/a03f6a44/attachment.mbox>
More information about the Freeipa-devel
mailing list