[sork] commit please

Anton Nekhoroshikh anton at valuehost.ru
Mon Dec 9 21:46:35 PST 2002


Hello, sork.

cvs diff Driver.php (in directory C:\projects\valuehost\horde\passwd\lib\)
Index: Driver.php
===================================================================
RCS file: /repository/passwd/lib/Driver.php,v
retrieving revision 1.7
diff -r1.7 Driver.php
99a100,111
>                 $salt = substr($encrypted , 0, 2); // default method CRYPT_STD_DES
>                 if(preg_match('/^\$1\$(.*)\$(.*)/',$encrypted,$match)){ // if CRYPT_MD5
>                   $salt='$1$'.$match[1].'$';
>                 }
>                 if(preg_match('/^\$2\$(.*)\$(.*)/',$encrypted,$match)){ // if CRYPT_BLOWFISH
>                   $salt='$2$'.$match[1].'$';
>                 }
>                 if (($encrypted == crypt($plaintext, $salt)  // for previos salt's
>                     ||($encrypted == crypt($plaintext, substr($encrypted , 0, 9) )) {  // for CRYPT_EXT_DES
>                  return true;
>                 }
>                 break;
153c165
<                 $newPassword = "{crypt}" . crypt($newPassword);
---
>                 $newPassword = crypt($newPassword);



-- 
 Anton                          mailto:anton@valuehost.ru



More information about the sork mailing list