diff --git a/core/authentication_api.php b/core/authentication_api.php index 140a7fb7bb..5fd48e48c5 100644 --- a/core/authentication_api.php +++ b/core/authentication_api.php @@ -6,7 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Id: authentication_api.php,v 1.61 2007-10-14 19:07:36 nuclear_eclipse Exp $ + # $Id: authentication_api.php,v 1.62 2007-10-19 06:53:24 vboctor Exp $ # -------------------------------------------------------- require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'gpc_api.php' ); @@ -205,6 +205,13 @@ function auth_does_password_match( $p_user_id, $p_test_password ) { # pass the stored password in as the salt if ( auth_process_plain_password( $p_test_password, $t_password, $t_login_method ) == $t_password ) { + # Do not support migration to PLAIN, since this would be a crazy thing to do. + # Also if we do, then a user will be able to login by providing the MD5 value + # that is copied from the database. See #8467 for more details. + if ( $t_configured_login_method != PLAIN && $t_login_method == PLAIN ) { + continue; + } + # Check for migration to another login method and test whether the password was encrypted # with our previously insecure implemention of the CRYPT method if ( ( $t_login_method != $t_configured_login_method ) ||