From 670d9305730865def16416ba6f775daaefd90787 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 27 Aug 2023 15:39:20 +0300 Subject: [PATCH] fix yggdrasil trackers validation --- src/public/edit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/public/edit.php b/src/public/edit.php index fe8ef82..afd5b1f 100644 --- a/src/public/edit.php +++ b/src/public/edit.php @@ -241,7 +241,7 @@ else { ) ); - if (preg_match(YGGDRASIL_URL_REGEX, $url->host->name)) + if (preg_match(YGGDRASIL_URL_REGEX, str_replace(['[',']'], false, $url->host->name))) { $response->form->tr->valid->success = true; $response->form->tr->valid->message = false; @@ -277,7 +277,7 @@ else { ) ); - if (preg_match(YGGDRASIL_URL_REGEX, $url->host->name)) + if (preg_match(YGGDRASIL_URL_REGEX, str_replace(['[',']'], false, $url->host->name))) { $response->form->as->valid->success = true; $response->form->as->valid->message = false; @@ -313,7 +313,7 @@ else { ) ); - if (preg_match(YGGDRASIL_URL_REGEX, $url->host->name)) + if (preg_match(YGGDRASIL_URL_REGEX, str_replace(['[',']'], false, $url->host->name))) { $response->form->xs->valid->success = true; $response->form->xs->valid->message = false;