From: Benni Bärmann Date: Sun, 23 Sep 2012 18:30:24 +0000 (+0200) Subject: store passwords crypted in database X-Git-Url: http://aymargeddon.de/gitweb/?p=aymargeddon%2Fcurrent.git;a=commitdiff_plain;h=1bcd0f8ac5bec1ea7f5dddaec3f2a73b51c23bd7 store passwords crypted in database dont use uppercase-only passwords --- diff --git a/INSTALL b/INSTALL index 3df2e3c..a861536 100644 --- a/INSTALL +++ b/INSTALL @@ -26,7 +26,7 @@ Wenn das alles läuft, könnt ihr loslegen. Eigentliche Installation ======================== -* Ihr müsst den Apache so konfigurieren, dass das Verzeichnis html/ aus dem Source zugänglich ist von außen und dort epl-Dateien ausgeführt werden können und das Embperl im src-Verzeichnis Module nachladen kann; zB via "PerlPostConfigRequire /etc/apache/startup.pl" und da dann so was in der Art: +* Ihr müsst den Apache so konfigurieren, dass das Verzeichnis html/ aus dem Source zugänglich ist von außen und dort epl-Dateien ausgeführt werden können und das Embperl im src-Verzeichnis Module nachladen kann; zB via "PerlPostConfigRequire /etc/apache2/startup.pl" und da dann so was in der Art: use lib qw( /var/www/benni/aymargeddon.de/game/src ); 1; diff --git a/html/login.epl b/html/login.epl index 64990c3..c1c77e2 100644 --- a/html/login.epl +++ b/html/login.epl @@ -54,7 +54,7 @@ [$ else $] [# ask for login-data or register #] [+ $db->loc('LOGIN_WELCOME') +]

-

+ [+ $db->loc('LOGIN_USERNAME') +]: [+ $db->loc('LOGIN_PASSWORD') +]: 'Aymargeddon', -DEFAULT_LANGUAGE => 'EN', -LOG_TIME_IN_LOOP => 1000, # loops until next time output in log - -DEBUG => 2, - -EPL_DEBUG => 2, + -DEBUG => 1, + -EPL_DEBUG => 1, -MESSAGE_IN_LOG => 0, -FULL_DEBUG_FILE => '/home/benni/aymargeddon/current/src/FROGS/+out', -SCHEDULER_SLEEP => 2, diff --git a/src/FROGS/DataBase.pm b/src/FROGS/DataBase.pm index 38921dd..be79739 100644 --- 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'; - 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);