diff --git a/CHANGELOG.md b/CHANGELOG.md
index 709a0a1ee..afa0de895 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# 📖 Change Log
+## [v2.4.2](https://github.com/torrentpier/torrentpier/tree/v2.4.2) (2024-XX-XX)
+[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.1...v2.4.2)
+
+**Merged pull requests:**
+
+- Release 2.4.2 🐯 ([belomaxorka](https://github.com/belomaxorka))
+- Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka))
+
## [v2.4.1](https://github.com/torrentpier/torrentpier/tree/v2.4.1) (2024-02-04)
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0...v2.4.1)
diff --git a/library/ajax/edit_user_profile.php b/library/ajax/edit_user_profile.php
index 2082477f5..10a9e09c1 100644
--- a/library/ajax/edit_user_profile.php
+++ b/library/ajax/edit_user_profile.php
@@ -127,6 +127,10 @@ switch ($field) {
$table = BB_BT_USERS;
$value = (float)str_replace(',', '.', $this->request['value']);
+ if ($value < 0.0) {
+ $this->ajax_die($lang['WRONG_INPUT']);
+ }
+
foreach (['KB' => 1, 'MB' => 2, 'GB' => 3, 'TB' => 4, 'PB' => 5, 'EB' => 6, 'ZB' => 7, 'YB' => 8] as $s => $m) {
if (stripos($this->request['value'], $s) !== false) {
$value *= (1024 ** $m);
diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php
index cd7d58af4..928e8f577 100644
--- a/library/attach_mod/displaying_torrent.php
+++ b/library/attach_mod/displaying_torrent.php
@@ -153,7 +153,7 @@ if ($tor_reged && $tor_info) {
$dl_allowed = true;
$user_ratio = 0;
- if (($min_ratio_dl || $min_ratio_warn) && $bt_user_id != $poster_id) {
+ if (($min_ratio_dl || $min_ratio_warn) && ($bt_user_id != $poster_id && $bt_user_id != GUEST_UID)) {
$sql = "SELECT u.*, dl.user_status
FROM " . BB_BT_USERS . " u
LEFT JOIN " . BB_BT_DLSTATUS . " dl ON dl.user_id = $bt_user_id AND dl.topic_id = $bt_topic_id
diff --git a/library/config.php b/library/config.php
index 3fe986b9e..72f054d9d 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'] = 'v2.4.1';
-$bb_cfg['tp_release_date'] = '04-02-2024';
+$bb_cfg['tp_version'] = 'v2.4.2';
+$bb_cfg['tp_release_date'] = 'XX-XX-2024';
$bb_cfg['tp_release_codename'] = 'Cattle';
// Database
diff --git a/privmsg.php b/privmsg.php
index d92b026b5..687364377 100644
--- a/privmsg.php
+++ b/privmsg.php
@@ -62,6 +62,13 @@ $template->assign_vars([
'QUICK_REPLY' => $bb_cfg['show_quick_reply'] && $folder == 'inbox' && $mode == 'read',
]);
+//
+// Set mode for quick reply
+//
+if ($bb_cfg['show_quick_reply'] && $folder == 'inbox' && $mode == 'read' && $preview) {
+ $mode = 'reply';
+}
+
//
// Cancel
//
@@ -90,10 +97,9 @@ $outbox_url = ($folder != 'outbox' || $mode != '') ? '' . $lang['SENTBOX'] . '' : $lang['SENTBOX'];
$savebox_url = ($folder != 'savebox' || $mode != '') ? '' . $lang['SAVEBOX'] . '' : $lang['SAVEBOX'];
-// ----------
+//
// Start main
//
-
$template->assign_var('POSTING_SUBJECT');
if ($mode == 'read') {
@@ -317,6 +323,7 @@ if ($mode == 'read') {
}
$s_hidden_fields = '';
+ $s_hidden_fields = '';
$page_title = $lang['READ_PM'];