Skip to content

Commit 036579b

Browse files
author
vogelor
committed
fixed a bug in openbasedir (hopefully the last time)
1 parent 21f4ec1 commit 036579b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,10 @@ function update($event_name,$data) {
573573
$cgi_tpl = new tpl();
574574
$cgi_tpl->newTemplate("php-cgi-starter.master");
575575

576-
$cgi_tpl->setVar('open_basedir', "/var/www/" . $data["new"]["domain"]);
576+
// This works, because php "rewrites" a symlink to the physical path
577+
$cgi_tpl->setVar('open_basedir', $data["new"]["document_root"]);
578+
// This will NOT work!
579+
//$cgi_tpl->setVar('open_basedir', "/var/www/" . $data["new"]["domain"]);
577580
$cgi_tpl->setVar('php_cgi_bin',$cgi_config["cgi_bin"]);
578581

579582
$cgi_starter_script = escapeshellcmd($cgi_starter_path.$cgi_config["cgi_starter_script"]);

0 commit comments

Comments
 (0)