Skip to content

Commit

Permalink
Fixed #8467: Major bug in authentification process
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4649 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Oct 19, 2007
1 parent 110bda9 commit d17426d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/authentication_api.php
Expand Up @@ -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' );
Expand Down Expand Up @@ -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 ) ||
Expand Down

0 comments on commit d17426d

Please sign in to comment.