From fec95a83b49a8bdfa56c32cbf9000443330990a4 Mon Sep 17 00:00:00 2001 From: Alex Negulescu Date: Wed, 29 May 2024 13:06:15 +0300 Subject: [PATCH] fix the check to really match index instead of also being valid when strpos returns false --- gui/public/client/dns_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/public/client/dns_edit.php b/gui/public/client/dns_edit.php index 7da355e7db..a5d6ebf69b 100644 --- a/gui/public/client/dns_edit.php +++ b/gui/public/client/dns_edit.php @@ -154,11 +154,11 @@ function client_validate_NAME($name, &$errorString) } - if (strpos($name, '_') == 0) { + if (strpos($name, '_') === 0) { $name = substr($name, 1); } - if (strpos($name, '*.') == 0) { + if (strpos($name, '*.') === 0) { $name = substr($name, 2); }