Skip to content
Permalink
Browse files

Fix incorrect password check for newsletter account maintenance (wron…

…gly uses old md5 scheme, which will fail)
  • Loading branch information...
chrisgraham committed Jun 18, 2019
1 parent 13f81b0 commit 6a99abe90c9215733f1d92fd99320f19cbb6e73f
Showing with 2 additions and 1 deletion.
  1. +2 −1 site/pages/modules/newsletter.php
@@ -440,7 +440,8 @@ public function newsletter_maintenance()
// Change/make settings
$old_password = $GLOBALS['SITE_DB']->query_select_value('newsletter_subscribers', 'the_password', array('email' => $email));
$old_salt = $GLOBALS['SITE_DB']->query_select_value('newsletter_subscribers', 'pass_salt', array('email' => $email));
if ((!has_privilege(get_member(), 'change_newsletter_subscriptions')) && (!is_null($old_confirm)) && ($old_confirm == 0) && ($old_password != '') && ($old_password != md5($password . $old_salt))) { // Access denied. People who can change any subscriptions can't get denied.
require_code('crypt');
if ((!has_privilege(get_member(), 'change_newsletter_subscriptions')) && (!is_null($old_confirm)) && ($old_confirm == 0) && ($old_password != '') && (ratchet_hash_verify($password, $old_password, $old_salt))) { // Access denied. People who can change any subscriptions can't get denied.
// Access denied to an existing record that was confirmed
$_reset_url = build_url(array('page' => '_SELF', 'type' => 'reset', 'email' => $email), '_SELF');
$reset_url = $_reset_url->evaluate();

0 comments on commit 6a99abe

Please sign in to comment.
You can’t perform that action at this time.