From: <var...@us...> - 2014-10-03 13:35:45
|
Revision: 9164 http://sourceforge.net/p/phpwiki/code/9164 Author: vargenau Date: 2014-10-03 13:35:42 +0000 (Fri, 03 Oct 2014) Log Message: ----------- function crypt exists Modified Paths: -------------- trunk/lib/WikiUser.php Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-10-02 14:47:14 UTC (rev 9163) +++ trunk/lib/WikiUser.php 2014-10-03 13:35:42 UTC (rev 9164) @@ -1308,29 +1308,20 @@ } if (ENCRYPTED_PASSWD) { // Verify against encrypted password. - if (function_exists('crypt')) { - if (crypt($submitted_password, $stored_password) == $stored_password) - return true; // matches encrypted password - else - return false; - } else { - trigger_error(_("The crypt function is not available in this version of PHP.") . " " - . _("Please set ENCRYPTED_PASSWD to false in config/config.ini and probably change ADMIN_PASSWD."), - E_USER_WARNING); + if (crypt($submitted_password, $stored_password) == $stored_password) + return true; // matches encrypted password + else return false; - } } else { // Verify against cleartext password. if ($submitted_password == $stored_password) return true; else { // Check whether we forgot to enable ENCRYPTED_PASSWD - if (function_exists('crypt')) { - if (crypt($submitted_password, $stored_password) == $stored_password) { - trigger_error(_("Please set ENCRYPTED_PASSWD to true in config/config.ini."), - E_USER_WARNING); - return true; - } + if (crypt($submitted_password, $stored_password) == $stored_password) { + trigger_error(_("Please set ENCRYPTED_PASSWD to true in config/config.ini."), + E_USER_WARNING); + return true; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |