*** helpers/basic_auth/DB/squid_db_auth.in	2010-05-30 09:21:12.000000000 -0400
--- helpers/basic_auth/DB/squid_db_auth.in.milen	2010-07-08 08:17:21.000000000 -0400
***************
*** 22,27 ****
--- 22,28 ----
  my $db_passwdcol = "password";
  my $db_cond = "enabled = 1";
  my $plaintext = 0;
+ my $md5 = 0;
  my $persist = 0;
  my $isjoomla = 0;
  my $debug = 0;
***************
*** 72,77 ****
--- 73,82 ----
  
  Database contains plain-text passwords
  
+ =item   B<--md5>
+ 
+ Database contains md5 passwords
+ 
  =item	B<--salt>
  
  Selects the correct salt to evaluate passwords
***************
*** 98,103 ****
--- 103,109 ----
  	'passwdcol=s' => \$db_passwdcol,
  	'cond=s' => \$db_cond,
  	'plaintext' => \$plaintext,
+ 	'md5' => \$md5,
  	'persist' => \$persist,
  	'joomla' => \$isjoomla,
  	'debug' => \$debug,
***************
*** 143,148 ****
--- 149,155 ----
          return 1 if defined $hashsalt && crypt($password, $hashsalt) eq $key;
          return 1 if crypt($password, $key) eq $key;
          return 1 if $plaintext && $password eq $key;
+         return 1 if $md5 && md5_hex($password) eq $key;
      }
  
      return 0;

