Ignore:
Timestamp:
04/25/12 17:33:53 (13 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Hand-port login fix from r316, bump release version numbers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/dns.cgi

    r263 r317  
    217217  if ($webvar{action} eq 'login') {
    218218    # Snag ACL/permissions here too
    219     my $sth = $dbh->prepare("SELECT user_id,group_id,password,firstname,lastname FROM users WHERE username=?");
     219    my $sth = $dbh->prepare("SELECT user_id,group_id,password,firstname,lastname,status FROM users WHERE username=?");
    220220    $sth->execute($webvar{username});
    221221
    222     if (my ($uid,$gid,$pass,$fname,$lname) = $sth->fetchrow_array) {
     222    if (my ($uid,$gid,$pass,$fname,$lname,$status) = $sth->fetchrow_array) {
    223223      $webvar{password} = '' if !$webvar{password};
    224 
    225       if ($pass =~ m|^\$1\$([A-Za-z0-9/.]+)\$|) {
     224      if (!$status) {
     225        $webvar{loginfailed} = 1;
     226      } elsif ($pass =~ m|^\$1\$([A-Za-z0-9/.]+)\$|) {
    226227        # native passwords (crypt-md5)
    227228        $webvar{loginfailed} = 1 if $pass ne unix_md5_crypt($webvar{password},$1);
Note: See TracChangeset for help on using the changeset viewer.