diff --git a/composer.lock b/composer.lock index 77676de8e..a8f2332e8 100644 --- a/composer.lock +++ b/composer.lock @@ -893,12 +893,12 @@ "source": { "type": "git", "url": "https://github.com/Gemorroj/M3uParser.git", - "reference": "92fc0fe236d77e1b5a26c735ffcb6fc637eb298a" + "reference": "95c62fd837e7adad1694d86dd8f6b31b603ab819" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Gemorroj/M3uParser/zipball/92fc0fe236d77e1b5a26c735ffcb6fc637eb298a", - "reference": "92fc0fe236d77e1b5a26c735ffcb6fc637eb298a", + "url": "https://api.github.com/repos/Gemorroj/M3uParser/zipball/95c62fd837e7adad1694d86dd8f6b31b603ab819", + "reference": "95c62fd837e7adad1694d86dd8f6b31b603ab819", "shasum": "" }, "require": { @@ -933,9 +933,9 @@ ], "support": { "issues": "https://github.com/Gemorroj/M3uParser/issues", - "source": "https://github.com/Gemorroj/M3uParser/tree/6.0.1" + "source": "https://github.com/Gemorroj/M3uParser/tree/master" }, - "time": "2025-03-25T19:21:43+00:00" + "time": "2025-05-04T19:36:03+00:00" }, { "name": "gigablah/sphinxphp", @@ -3745,6 +3745,6 @@ "platform": { "php": ">=8.1" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/install/upgrade/legacy-changes.txt b/install/upgrade/legacy-changes.txt index cb5dfa239..942ed2075 100644 --- a/install/upgrade/legacy-changes.txt +++ b/install/upgrade/legacy-changes.txt @@ -153,5 +153,5 @@ ALTER TABLE `bb_topics` ADD COLUMN `topic_allow_robots` TINYINT(1) UNSIGNED NOT INSERT INTO `bb_config` VALUES ('magnet_links_for_guests', '0'); INSERT INTO `bb_config` VALUES ('tp_instance_hash', ''); -// 2.4.5 +// 2.4.5-rc.5 DELETE FROM `bb_config` WHERE `config_name` = 'tp_instance_hash'; diff --git a/library/includes/functions.php b/library/includes/functions.php index 61954e856..67256eb1f 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -605,11 +605,14 @@ function bt_show_ip($ip, $port = '') if (IS_AM) { $ip = \TorrentPier\Helpers\IPHelper::long2ip_extended($ip); - // Wrap IPv6 address in square brackets - if ($port && str_contains($ip, ':')) { - $ip = "[$ip]"; + if (!empty($port)) { + if (\TorrentPier\Helpers\IPHelper::isValidv6($ip)) { + // Wrap IPv6 address in square brackets + $ip = "[$ip]:$port"; + } else { + $ip = "$ip:$port"; + } } - $ip .= $port ? ":$port" : ''; return $ip; }