Changeset 317


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

Location:
branches/stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/DNSDB.pm

    r263 r317  
    3232use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
    3333
    34 $VERSION        = 0.1;  ##VERSION##
     34$VERSION        = 1.0.1;        ##VERSION##
    3535@ISA            = qw(Exporter);
    3636@EXPORT_OK      = qw(
  • branches/stable/Makefile

    r263 r317  
    33
    44PKGNAME=dnsadmin
    5 VERSION=1.0
     5VERSION=1.0.1
    66RELEASE=1
    77
  • 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.