Fixed md5() deprecated in PHP 8.4 (#1561)

* Fixed md5() deprecated for PHP 8.4

* Updated

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-07-24 13:11:56 +07:00 committed by GitHub
commit 612004c10b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View file

@ -1,5 +1,13 @@
# 📖 Change Log # 📖 Change Log
## [v2.4.5](https://github.com/torrentpier/torrentpier/tree/v2.4.5) (2024-XX-XX)
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.4...v2.4.5)
**Merged pull requests:**
- Release 2.4.5 🦕 ([belomaxorka](https://github.com/belomaxorka))
- Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([belomaxorka](https://github.com/belomaxorka))
## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22) ## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22)
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.3...v2.4.4) [Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.3...v2.4.4)

View file

@ -21,8 +21,8 @@ $bb_cfg = [];
$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1; $bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1;
// Version info // Version info
$bb_cfg['tp_version'] = 'v2.4.4'; $bb_cfg['tp_version'] = 'v2.4.5-dev';
$bb_cfg['tp_release_date'] = '22-07-2024'; $bb_cfg['tp_release_date'] = 'XX-XX-2024';
$bb_cfg['tp_release_codename'] = 'Cattle'; $bb_cfg['tp_release_codename'] = 'Cattle';
// Database // Database

View file

@ -788,7 +788,7 @@ class User
return true; return true;
} else { } else {
if (md5(md5($enteredPassword)) === $userdata['user_password']) { if (hash('md5', hash('md5', $enteredPassword)) === $userdata['user_password']) {
// Update old md5 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"); 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");