From 2983aa5737247c1c2efa2fa8badeef320d1c2e90 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 14 Jan 2019 00:18:26 +0100 Subject: [PATCH] htpasswd only on given paths Only apply htpasswd rules to (sub)domains if the rule's path begins with the domain's document root. --- lib/Froxlor/Cron/Http/Nginx.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Froxlor/Cron/Http/Nginx.php b/lib/Froxlor/Cron/Http/Nginx.php index 9440d698..abc4ca49 100644 --- a/lib/Froxlor/Cron/Http/Nginx.php +++ b/lib/Froxlor/Cron/Http/Nginx.php @@ -849,6 +849,7 @@ class Nginx extends HttpConfigBase FROM `" . TABLE_PANEL_HTPASSWDS . "` AS a JOIN `" . TABLE_PANEL_DOMAINS . "` AS b USING (`customerid`) WHERE b.customerid = :customerid AND b.domain = :domain + AND path LIKE CONCAT(b.documentroot, '%') "); Database::pexecute($result_stmt, array( 'customerid' => $domain['customerid'],