Skip to content

Commit

Permalink
Logic flipped.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed Dec 29, 2019
1 parent 46a5fd9 commit 3d8b62c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Auth_SMF.php
Expand Up @@ -168,7 +168,7 @@ function AutoAuthenticateSMF ($initial_user_data, &$user)
if (!empty($user_settings))
{
// SHA-1 passwords should be 40 characters long.
if (strlen($password) == 40 && !empty($smf_settings['cookie_no_auth_secret']) && empty($smf_settings['auth_secret']))
if (strlen($password) == 40 && empty($smf_settings['cookie_no_auth_secret']) && !empty($smf_settings['auth_secret']))
$check = hash_hmac('sha1', sha1($user_settings['passwd'] . $user_settings['password_salt']), $smf_settings['auth_secret']) == $password;
elseif (strlen($password) == 40)
$check = sha1($user_settings['passwd'] . $user_settings['password_salt']) == $password;
Expand Down

0 comments on commit 3d8b62c

Please sign in to comment.