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:
@@ -849,6 +849,7 @@ class Nginx extends HttpConfigBase
|
|||||||
FROM `" . TABLE_PANEL_HTPASSWDS . "` AS a
|
FROM `" . TABLE_PANEL_HTPASSWDS . "` AS a
|
||||||
JOIN `" . TABLE_PANEL_DOMAINS . "` AS b USING (`customerid`)
|
JOIN `" . TABLE_PANEL_DOMAINS . "` AS b USING (`customerid`)
|
||||||
WHERE b.customerid = :customerid AND b.domain = :domain
|
WHERE b.customerid = :customerid AND b.domain = :domain
|
||||||
|
AND path LIKE CONCAT(b.documentroot, '%')
|
||||||
");
|
");
|
||||||
Database::pexecute($result_stmt, array(
|
Database::pexecute($result_stmt, array(
|
||||||
'customerid' => $domain['customerid'],
|
'customerid' => $domain['customerid'],
|
||||||
|
|||||||
Reference in New Issue
Block a user