From d9f7babc7979b400ba4e267b6ea8a9db5932ae82 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 21 May 2017 09:07:56 +0545 Subject: [PATCH] Diag DNS do not show Add Alias if no priv to add alais (cherry picked from commit 7fcccc8f09afd7f4a524ff598b43e15d678905eb) (cherry picked from commit f54a3ede59ee819500f272ea87b244b7ab949e41) --- src/usr/local/www/diag_dns.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php index 502efa7de1..3cf1cde0f2 100644 --- a/src/usr/local/www/diag_dns.php +++ b/src/usr/local/www/diag_dns.php @@ -116,7 +116,7 @@ function resolve_host_addresses($host) { return $resolved; } -if (isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) { +if (isAllowedPage('firewall_aliases_edit.php') && isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) { $resolved = gethostbyname($host); $type = "hostname"; if ($resolved) { @@ -281,7 +281,7 @@ $form->addGlobal(new Form_Button( 'fa-search' ))->addClass('btn-primary'); -if (!empty($resolved)) { +if (!empty($resolved) && isAllowedPage('firewall_aliases_edit.php')) { if ($alias_exists) { $button_text = gettext("Update alias"); } else {