diff --git a/CHANGELOG.md b/CHANGELOG.md index 84a36a28d..92ff4a7a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Change Log +## [v2.3.1-rc1](https://github.com/torrentpier/torrentpier/tree/v2.3.1-rc1) (2023-03-10) +[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0.4-beta2...v2.3.1-rc1) + +**Merged pull requests:** + +- Minor adjustments in sql dumps [\#560](https://github.com/torrentpier/torrentpier/pull/560), [\#561](https://github.com/torrentpier/torrentpier/pull/561) ([belomaxorka](https://github.com/belomaxorka)) +- New BB_PATH implementation [\#562](https://github.com/torrentpier/torrentpier/pull/562) ([belomaxorka](https://github.com/belomaxorka)) +- Use constants instead of string literals [\#563](https://github.com/torrentpier/torrentpier/pull/563), [\#573](https://github.com/torrentpier/torrentpier/pull/573) ([belomaxorka](https://github.com/belomaxorka)) +- Hide feed button if feed file doesn't exist [\#564](https://github.com/torrentpier/torrentpier/pull/564) ([belomaxorka](https://github.com/belomaxorka)) +- Added some new fonts in bbcode editor [\#565](https://github.com/torrentpier/torrentpier/pull/565) ([belomaxorka](https://github.com/belomaxorka)) +- Added some new font sizes in bbcode editor [\#566](https://github.com/torrentpier/torrentpier/pull/566) ([belomaxorka](https://github.com/belomaxorka)) +- Added optional parameter in $valid_actions [AJAX] [\#567](https://github.com/torrentpier/torrentpier/pull/567) ([belomaxorka](https://github.com/belomaxorka)) +- Check if request is ajax [\#569](https://github.com/torrentpier/torrentpier/pull/569) ([belomaxorka](https://github.com/belomaxorka)) +- Fixed code-style in some files [\#570](https://github.com/torrentpier/torrentpier/pull/570) ([belomaxorka](https://github.com/belomaxorka)) +- Minor adjustments [\#571](https://github.com/torrentpier/torrentpier/pull/571), [\#584](https://github.com/torrentpier/torrentpier/pull/584) ([belomaxorka](https://github.com/belomaxorka)) +- Added link to forum in admin_forumauth.tpl [\#574](https://github.com/torrentpier/torrentpier/pull/574) ([belomaxorka](https://github.com/belomaxorka)) +- Simplified make_rand_str function [\#575](https://github.com/torrentpier/torrentpier/pull/575) ([belomaxorka](https://github.com/belomaxorka)) +- Redesigned admin_ug_auth [\#576](https://github.com/torrentpier/torrentpier/pull/576) ([belomaxorka](https://github.com/belomaxorka)) +- Fixed broken "user_viewonline" in admin panel [\#579](https://github.com/torrentpier/torrentpier/pull/579) ([belomaxorka](https://github.com/belomaxorka)) +- Make sitemap sending configurable [\#585](https://github.com/torrentpier/torrentpier/pull/585) ([belomaxorka](https://github.com/belomaxorka)) +- Fixed get_avatar method [\#586](https://github.com/torrentpier/torrentpier/pull/586) ([belomaxorka](https://github.com/belomaxorka)) +- Added show avatar in memberlist [\#587](https://github.com/torrentpier/torrentpier/pull/587) ([belomaxorka](https://github.com/belomaxorka)) + ## [v2.3.0.4-beta2](https://github.com/torrentpier/torrentpier/tree/v2.3.0.4-beta2) (2023-03-04) [Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0.4-beta...v2.3.0.4-beta2) diff --git a/library/config.php b/library/config.php index 1143c6ac3..1e113d474 100644 --- a/library/config.php +++ b/library/config.php @@ -21,8 +21,8 @@ $bb_cfg = []; $bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1; // Version info -$bb_cfg['tp_version'] = '2.3.0.4-beta2'; -$bb_cfg['tp_release_date'] = '04-03-2023'; +$bb_cfg['tp_version'] = '2.3.1-rc1'; +$bb_cfg['tp_release_date'] = '10-03-2023'; $bb_cfg['tp_release_codename'] = 'Bison'; // Database diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index 825ae4da0..b8ea9ef9c 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -159,8 +159,6 @@ define('PRIVMSGS_UNREAD_MAIL', 5); define('HAVE_UNREAD_PM', 1); define('HAVE_NEW_PM', 2); -define('USERNAME_MIN_LENGTH', 3); - // URL PARAMETERS (hardcoding allowed) define('POST_CAT_URL', 'c'); define('POST_FORUM_URL', 'f'); @@ -274,10 +272,14 @@ define('SHOW_PEERS_NAMES', 2); define('SHOW_PEERS_FULL', 3); define('SEARCH_ID_LENGTH', 12); +define('ACTKEY_LENGHT', 32); define('SID_LENGTH', 20); -define('LOGIN_KEY_LENGTH', 12); +define('LOGIN_KEY_LENGTH', 32); +define('USERNAME_MIN_LENGTH', 3); define('USERNAME_MAX_LENGTH', 25); define('USEREMAIL_MAX_LENGTH', 40); +define('PASSWORD_MIN_LENGTH', 8); +define('PASSWORD_MAX_LENGTH', 24); define('PAGE_HEADER', INC_DIR . '/page_header.php'); define('PAGE_FOOTER', INC_DIR . '/page_footer.php'); diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index 28bb73688..4a51d15f9 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -535,7 +535,7 @@ if ($submit && !$errors) { */ if ($mode == 'register') { if ($bb_cfg['reg_email_activation']) { - $user_actkey = make_rand_str(12); + $user_actkey = make_rand_str(ACTKEY_LENGHT); $db_data['user_active'] = 0; $db_data['user_actkey'] = $user_actkey; } else { @@ -600,7 +600,7 @@ if ($submit && !$errors) { // если что-то было изменено if ($db_data) { if (!$pr_data['user_active']) { - $user_actkey = make_rand_str(12); + $user_actkey = make_rand_str(ACTKEY_LENGHT); $pr_data['user_actkey'] = $user_actkey; $db_data['user_actkey'] = $user_actkey; diff --git a/library/includes/ucp/sendpasswd.php b/library/includes/ucp/sendpasswd.php index e170c2dd3..1d4589edb 100644 --- a/library/includes/ucp/sendpasswd.php +++ b/library/includes/ucp/sendpasswd.php @@ -37,8 +37,8 @@ if (isset($_POST['submit'])) { $username = $row['username']; $user_id = $row['user_id']; - $user_actkey = make_rand_str(12); - $user_password = make_rand_str(8); + $user_actkey = make_rand_str(ACTKEY_LENGHT); + $user_password = make_rand_str(PASSWORD_MIN_LENGTH); $sql = "UPDATE " . BB_USERS . " SET user_newpasswd = '$user_password', user_actkey = '$user_actkey' diff --git a/src/Legacy/Ajax.php b/src/Legacy/Ajax.php index f779a72da..42a4d0aad 100644 --- a/src/Legacy/Ajax.php +++ b/src/Legacy/Ajax.php @@ -101,14 +101,14 @@ class Ajax case 'guest': break; - // USER + // USER case 'user': if (IS_GUEST) { $this->ajax_die($lang['NEED_TO_LOGIN_FIRST']); } break; - // MOD + // MOD case 'mod': if (!IS_AM) { $this->ajax_die($lang['ONLY_FOR_MOD']); @@ -116,7 +116,7 @@ class Ajax $this->check_admin_session(); break; - // ADMIN + // ADMIN case 'admin': if (!IS_ADMIN) { $this->ajax_die($lang['ONLY_FOR_ADMIN']); @@ -124,7 +124,7 @@ class Ajax $this->check_admin_session(); break; - // SUPER_ADMIN + // SUPER_ADMIN case 'super_admin': if (!IS_SUPER_ADMIN) { $this->ajax_die($lang['ONLY_FOR_SUPER_ADMIN']); diff --git a/src/Legacy/Cache/File.php b/src/Legacy/Cache/File.php index c7e5ea857..5030e8519 100644 --- a/src/Legacy/Cache/File.php +++ b/src/Legacy/Cache/File.php @@ -31,7 +31,7 @@ class File extends Common { $filename = $this->dir . clean_filename($this->prefix . $name) . '.php'; - $this->cur_query = "cache->set('$name')"; + $this->cur_query = "cache->get('$name')"; $this->debug('start'); if (file_exists($filename)) { diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index bdbdee9ec..e7eb33b17 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -719,7 +719,6 @@ class Torrent $attempts = $success = $response = 0; while (!$success && $attempts++ < $max_attempts) { - // Send request $file = fsockopen($bb_cfg['ocelot']['host'], $bb_cfg['ocelot']['port'], $error_num, $error_string); if ($file) {