projects
/
aymargeddon
/
current.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
store passwords crypted in database
[aymargeddon/current.git]
/
src
/
FROGS
/
DataBase.pm
diff --git
a/src/FROGS/DataBase.pm
b/src/FROGS/DataBase.pm
index
38921dd
..
be79739
100644
(file)
--- a/
src/FROGS/DataBase.pm
+++ b/
src/FROGS/DataBase.pm
@@
-379,8
+379,12
@@
sub new_account{
# generate new password
my $pwd = '';
my $allowed = '2345679ACDEFGHIJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
# generate new password
my $pwd = '';
my $allowed = '2345679ACDEFGHIJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
- for my $i (0..7){
- $pwd .= substr($allowed, POSIX::floor(rand(72)), 1);
+ # we dont want uppercase-only passwords
+ while($pwd =~ /^[A-Z]*$/){
+ $pwd = '';
+ for my $i (0..7){
+ $pwd .= substr($allowed, POSIX::floor(rand(72)), 1);
+ }
}
my $qpwd = $self->{-dbh}->quote($pwd);
}
my $qpwd = $self->{-dbh}->quote($pwd);