htpasswd only on given paths

Only apply htpasswd rules to (sub)domains if the rule's path begins with the domain's document root.
This commit is contained in:
Max
2019-01-14 00:18:26 +01:00
committed by GitHub
parent 9a906427e7
commit 2983aa5737

View File

@@ -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'],