diff --git a/CHANGELOG.md b/CHANGELOG.md index bf3c82834..7113e4c65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ - Hide in topic: Added country hiding [\#1535](https://github.com/torrentpier/torrentpier/pull/1535) ([belomaxorka](https://github.com/belomaxorka)) - Hide vote button in topic for guests [\#1507](https://github.com/torrentpier/torrentpier/pull/1507) ([belomaxorka](https://github.com/belomaxorka)) - Word censor code optimization [\#1537](https://github.com/torrentpier/torrentpier/pull/1537) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1502](https://github.com/torrentpier/torrentpier/pull/1502), [\#1506](https://github.com/torrentpier/torrentpier/pull/1506), [\#1509](https://github.com/torrentpier/torrentpier/pull/1509), [\#1511](https://github.com/torrentpier/torrentpier/pull/1511), [\#1515](https://github.com/torrentpier/torrentpier/pull/1515), [\#1516](https://github.com/torrentpier/torrentpier/pull/1516), [\#1517](https://github.com/torrentpier/torrentpier/pull/1517), [\#1519](https://github.com/torrentpier/torrentpier/pull/1519), [\#1523](https://github.com/torrentpier/torrentpier/pull/1523), [\#1525](https://github.com/torrentpier/torrentpier/pull/1525), [\#1530](https://github.com/torrentpier/torrentpier/pull/1530), [\#1532](https://github.com/torrentpier/torrentpier/pull/1532), [\#1536](https://github.com/torrentpier/torrentpier/pull/1536), [\#1539](https://github.com/torrentpier/torrentpier/pull/1539), [\#1542](https://github.com/torrentpier/torrentpier/pull/1542) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1502](https://github.com/torrentpier/torrentpier/pull/1502), [\#1506](https://github.com/torrentpier/torrentpier/pull/1506), [\#1509](https://github.com/torrentpier/torrentpier/pull/1509), [\#1511](https://github.com/torrentpier/torrentpier/pull/1511), [\#1515](https://github.com/torrentpier/torrentpier/pull/1515), [\#1516](https://github.com/torrentpier/torrentpier/pull/1516), [\#1517](https://github.com/torrentpier/torrentpier/pull/1517), [\#1519](https://github.com/torrentpier/torrentpier/pull/1519), [\#1523](https://github.com/torrentpier/torrentpier/pull/1523), [\#1525](https://github.com/torrentpier/torrentpier/pull/1525), [\#1530](https://github.com/torrentpier/torrentpier/pull/1530), [\#1532](https://github.com/torrentpier/torrentpier/pull/1532), [\#1536](https://github.com/torrentpier/torrentpier/pull/1536), [\#1539](https://github.com/torrentpier/torrentpier/pull/1539), [\#1542](https://github.com/torrentpier/torrentpier/pull/1542), [\#1544](https://github.com/torrentpier/torrentpier/pull/1544) ([belomaxorka](https://github.com/belomaxorka)) - New Crowdin updates [\#1504](https://github.com/torrentpier/torrentpier/pull/1504), [\#1513](https://github.com/torrentpier/torrentpier/pull/1513) ([Exileum](https://github.com/Exileum)) ## [v2.4.3](https://github.com/torrentpier/torrentpier/tree/v2.4.3) (2024-06-09) diff --git a/library/ajax/thanks.php b/library/ajax/thanks.php index 3f55f1c4f..1fd9a83a4 100644 --- a/library/ajax/thanks.php +++ b/library/ajax/thanks.php @@ -48,7 +48,7 @@ switch ($mode) { DB()->query('INSERT IGNORE INTO ' . BB_THX . " ($columns) VALUES ($values)"); // Limit voters per topic - $thanks_count = DB()->fetch_row('SELECT COUNT(*) FROM ' . BB_THX . " WHERE topic_id = $topic_id"); + $thanks_count = DB()->fetch_row('SELECT COUNT(*) as thx FROM ' . BB_THX . " WHERE topic_id = $topic_id")['thx']; if ($thanks_count > (int)$bb_cfg['tor_thank_limit_per_topic']) { DB()->query('DELETE FROM ' . BB_THX . " WHERE topic_id = $topic_id ORDER BY time ASC LIMIT 1"); } diff --git a/src/Legacy/Common/User.php b/src/Legacy/Common/User.php index 718e6f1ae..b907ca6d9 100644 --- a/src/Legacy/Common/User.php +++ b/src/Legacy/Common/User.php @@ -174,7 +174,7 @@ class User if ($update_sessions_table) { DB()->query(" UPDATE " . BB_SESSIONS . " SET - session_time = " . TIMENOW . " + session_time = " . $this->data['session_time'] . " WHERE session_id = '$session_id' LIMIT 1 "); @@ -787,6 +787,13 @@ class User } return true; + } else { + if (md5(md5($enteredPassword)) === $userdata['user_password']) { + // Update old md5 password + DB()->query("UPDATE " . BB_USERS . " SET user_password = '" . $this->password_hash($enteredPassword) . "' WHERE user_id = '" . $userdata['user_id'] . "' AND user_password = '" . $userdata['user_password'] . "' LIMIT 1"); + + return true; + } } return false;