[dev] Patch for customsql to specify password encryption type

Joel Vandal jvandal at infoteck.qc.ca
Mon Jan 12 08:39:08 PST 2004


Hi,

This patch allow to specify the encryption type for password checking in customsql Auth driver. w/o this patch, all password are limited to md5 encryption.

Index: customsql.php
===================================================================
RCS file: /repository/framework/Auth/Auth/customsql.php,v
retrieving revision 1.8
diff -r1.8 customsql.php
26a27,36
>  * Optional parameters:
>  * ====================
>  *   'encryption'      --  The encryption to use to store the password in the
>  *                         table (e.g. plain, crypt, md5-hex, md5-base64, smd5,
>  *                         sha, ssha).
>  *                         DEFAULT: 'md5-hex'
>  *   'show_encryption' --  Whether or not to prepend the encryption in the
>  *                         password field.
>  *                         DEFAULT: 'true'
>  *
95c105
<         $query = str_replace("\P", $this->_db->quote(md5($credentials['password'])), $query);
---
>       $query = str_replace("\P", $this->_db->quote($this->_encryptPassword($credentials['password'])), $query);

-- 
Joel Vandal                                    Infoteck Internet
http://www.infoteck.qc.ca            Tel.  819-370-3232
jvandal at infoteck.qc.ca                 Fax. 819-370-3624


More information about the dev mailing list