diff --git a/CHANGELOG.md b/CHANGELOG.md index 239fc75c..681b9a2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - Release v2.1.5-2023.09 🎉 - Fixed cache directory auto-creating with SQLite [\#247](https://github.com/torrentpier/torrentpier-lts/pull/247) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#245](https://github.com/torrentpier/torrentpier-lts/pull/245), [\#246](https://github.com/torrentpier/torrentpier-lts/pull/246), [\#248](https://github.com/torrentpier/torrentpier-lts/pull/248) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#245](https://github.com/torrentpier/torrentpier-lts/pull/245), [\#246](https://github.com/torrentpier/torrentpier-lts/pull/246), [\#248](https://github.com/torrentpier/torrentpier-lts/pull/248), [\#249](https://github.com/torrentpier/torrentpier-lts/pull/249) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.1.5-2023.08-HotFix](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08-HotFix) (2023-09-17) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.08...v2.1.5-2023.08-HotFix) diff --git a/admin/admin_attachments.php b/admin/admin_attachments.php index f7ede54f..dcc2f049 100644 --- a/admin/admin_attachments.php +++ b/admin/admin_attachments.php @@ -252,7 +252,7 @@ if ($check_upload) if (!$error) { - if ( !($fp = @fopen($upload_dir . '/0_000000.000', 'wb')) ) + if ( !($fp = @fopen($upload_dir . '/0_000000.000', 'wb+')) ) { $error = TRUE; $error_msg = sprintf($lang['DIRECTORY_NOT_WRITEABLE'], $attach_config['upload_dir']) . '
'; @@ -441,7 +441,7 @@ if ($check_image_cat) if (!$error) { - if ( !($fp = @fopen($upload_dir . '/0_000000.000', 'wb')) ) + if ( !($fp = @fopen($upload_dir . '/0_000000.000', 'wb+')) ) { $error = TRUE; $error_msg = sprintf($lang['DIRECTORY_NOT_WRITEABLE'], $upload_dir) . '
'; diff --git a/bt/announce.php b/bt/announce.php index 6c3d66c0..30e0d3b7 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -78,7 +78,11 @@ if (strlen($info_hash) != 20) { msg_die('Invalid info_hash: ' . bin2hex($info_hash)); } -if (!isset($peer_id) || strlen($peer_id) != 20) +if (!isset($peer_id)) +{ + msg_die('peer_id was not provided'); +} +if (strlen($peer_id) != 20) { msg_die('Invalid peer_id: ' . bin2hex($peer_id)); } diff --git a/library/config.php b/library/config.php index 83e45189..5eac10ab 100644 --- a/library/config.php +++ b/library/config.php @@ -118,7 +118,7 @@ $bb_cfg['bt_min_ratio_warning'] = 0.6; // 0 - disable $tr_cfg = array( 'autoclean' => true, 'off' => false, - 'off_reason' => 'temporarily disabled', + 'off_reason' => 'Temporarily disabled', 'numwant' => 50, 'update_dlstat' => true, 'expire_factor' => 2.5,