[prev] [thread] [next] [lurker] [Date index for 2003/08/12]
Author: richardc Date: 2003-08-12 16:50:46 +0100 (Tue, 12 Aug 2003) New Revision: 1324 Modified: trunk/siesta/Build.PL trunk/siesta/lib/Siesta/Plugin/Challenge.pm trunk/siesta/lib/Siesta/Plugin/Subscribe.pm Log: switch to using String::Random Modified: trunk/siesta/Build.PL =================================================================== --- trunk/siesta/Build.PL 2003-08-12 15:39:23 UTC (rev 1323) +++ trunk/siesta/Build.PL 2003-08-12 15:50:46 UTC (rev 1324) @@ -11,7 +11,6 @@ 'Class::Accessor::Fast' => 0, 'Class::DBI::BaseDSN' => 0, 'Class::DBI::SQLite' => 0, - 'Crypt::RandPasswd' => 0, 'Digest::MD5' => 0, 'Email::Folder' => 0, 'Email::Simple' => '1.4', @@ -24,8 +23,9 @@ # Module::Build 0.18 is the first release with # working scripts shebang rewriting 'Module::Build' => '0.18', - 'Python::Serialise::Marshal' => 0, + 'Python::Serialise::Marshal' => 0, 'Storable' => 0, + 'String::Random' => 0, 'String::ShellQuote' => 0, 'Sys::Hostname' => 0, 'Tie::IxHash' => 0, Modified: trunk/siesta/lib/Siesta/Plugin/Challenge.pm =================================================================== --- trunk/siesta/lib/Siesta/Plugin/Challenge.pm 2003-08-12 15:39:23 UTC (rev 1323) +++ trunk/siesta/lib/Siesta/Plugin/Challenge.pm 2003-08-12 15:50:46 UTC (rev 1324) @@ -2,6 +2,7 @@ use strict; use Siesta::Plugin; use base 'Siesta::Plugin'; +use String::Random(); # suggested usage set_plugins( subscribe => qw( Challenge Subscribe ) ); # set_plugins( resume => qw( Resume ) ); @@ -17,7 +18,7 @@ my $newmember = 0; # is this a new member my $member = Siesta::Member->load( $mail->from ); unless ($member) { - my $password = `pwgen -1`; # XXX bad and wrong! + my $password = String::Random->new->randpattern('......'); $member = Siesta::Member->create({ email => $mail->from, password => $password }); $newmember = 1; Modified: trunk/siesta/lib/Siesta/Plugin/Subscribe.pm =================================================================== --- trunk/siesta/lib/Siesta/Plugin/Subscribe.pm 2003-08-12 15:39:23 UTC (rev 1323) +++ trunk/siesta/lib/Siesta/Plugin/Subscribe.pm 2003-08-12 15:50:46 UTC (rev 1324) @@ -2,6 +2,7 @@ package Siesta::Plugin::Subscribe; use strict; use Siesta::Plugin; +use String::Random; use base 'Siesta::Plugin'; sub description { @@ -25,7 +26,7 @@ my $user = Siesta::Member->load( $email ); my $newuser; unless ($user) { - my $password = `pwgen -1`; # XXX bad and wrong! + my $password = String::Random->new->randpattern('......'); $user = Siesta::Member->create({ email => $email, password => $password }); $newuser = 1;
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52