[Php-blog-plugin-cvs] additional_plugins/serendipity_event_forgotpassword ChangeLog, NONE, 1.1 ser
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: Garvin H. <gar...@us...> - 2010-02-18 08:31:48
|
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_forgotpassword In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2407 Modified Files: serendipity_event_forgotpassword.php Added Files: ChangeLog Log Message: Serendipity 1.5 compatibility Index: serendipity_event_forgotpassword.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_forgotpassword/serendipity_event_forgotpassword.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- serendipity_event_forgotpassword.php 7 Aug 2007 07:53:56 -0000 1.13 +++ serendipity_event_forgotpassword.php 18 Feb 2010 08:31:37 -0000 1.14 @@ -23,7 +23,7 @@ $propbag->add('description', PLUGIN_EVENT_FORGOTPASSWORD_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Omid Mottaghi'); - $propbag->add('version', '0.9'); + $propbag->add('version', '0.10'); $propbag->add('requirements', array( 'serendipity' => '0.9.1', 'smarty' => '2.6.7', @@ -170,9 +170,16 @@ $res = $sql[0]; $authorid = $res['authorid']; - $password = md5($_POST['password']); - $q = 'UPDATE '.$serendipity['dbPrefix'].'authors SET password=\''.$password.'\' where authorid = \''.serendipity_db_escape_string($_POST['username']).'\''; + if (function_exists('serendipity_hash')) { + $password = serendipity_hash($_POST['password']); + + $q = 'UPDATE '.$serendipity['dbPrefix'].'authors SET hashtype=1, password=\''.$password.'\' where authorid = \''.serendipity_db_escape_string($_POST['username']).'\''; + } else { + $password = md5($_POST['password']); + + $q = 'UPDATE '.$serendipity['dbPrefix'].'authors SET password=\''.$password.'\' where authorid = \''.serendipity_db_escape_string($_POST['username']).'\''; + } $sql = serendipity_db_query($q); if (!$sql){ --- NEW FILE: ChangeLog --- 0.10: ----- Serendipity 1.5 compatibility |