From 7afd67644de2bb03b4e4dca0a3579b4c7ae45cba Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 18 Dec 2020 13:04:11 +0100 Subject: [serversetup-bwlp-ipxe] Fix redirect for invalid/no IP set --- modules-available/serversetup-bwlp-ipxe/page.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules-available/serversetup-bwlp-ipxe/page.inc.php') diff --git a/modules-available/serversetup-bwlp-ipxe/page.inc.php b/modules-available/serversetup-bwlp-ipxe/page.inc.php index 122c3791..4fd324da 100644 --- a/modules-available/serversetup-bwlp-ipxe/page.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/page.inc.php @@ -132,7 +132,7 @@ class Page_ServerSetup extends Page $subs = Dashboard::getSubmenus(); if (empty($subs)) { User::assertPermission('download'); - } elseif (Property::getServerIp() === 'invalid' && $addr) { + } elseif ($addr && !preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', Property::getServerIp())) { Util::redirect('?do=serversetup&show=address'); } else { Util::redirect($subs[0]['url']); -- cgit v1.2.3-55-g7522