$libpath =~ /(.*)/;
$libpath = $1;
- my ($localconfig, $datadir);
+ my ($localconfig, $datadir, $confdir);
if ($project && $project =~ /^(\w+)$/) {
$project = $1;
$localconfig = "localconfig.$project";
$datadir = "data/$project";
+ $confdir = "conf/$project";
} else {
$project = undef;
$localconfig = "localconfig";
$datadir = "data";
+ $confdir = "conf";
}
$datadir = "$libpath/$datadir";
+ $confdir = "$libpath/$confdir";
# We have to return absolute paths for mod_perl.
# That means that if you modify these paths, they must be absolute paths.
return {
'assetsdir' => "$datadir/assets",
# error_reports store error/warnings destined for sentry
'error_reports' => "$libpath/error_reports",
+ 'confdir' => $confdir,
};
}
# when exploiting some security flaw somewhere (not necessarily in Bugzilla!)
sub FILESYSTEM {
my $datadir = bz_locations()->{'datadir'};
+ my $confdir = bz_locations()->{'confdir'};
my $attachdir = bz_locations()->{'attachdir'};
my $extensionsdir = bz_locations()->{'extensionsdir'};
my $webdotdir = bz_locations()->{'webdotdir'};
dirs => DIR_WS_SERVE },
"$extensionsdir/*/web" => { files => WS_SERVE,
dirs => DIR_WS_SERVE },
+ $confdir => { files => WS_SERVE,
+ dirs => DIR_WS_SERVE, },
# Purpose: allow webserver to read .bzr so we execute bzr commands
# in backticks and look at the result over the web. Used to show
# Directories that contain content served directly by the web server.
"$skinsdir/custom" => DIR_WS_SERVE,
"$skinsdir/contrib" => DIR_WS_SERVE,
+ $confdir => DIR_CGI_READ,
);
my $yui_all_css = sub {
contents => HT_DEFAULT_DENY },
'httpd/.htaccess' => { perms => WS_SERVE,
contents => HT_DEFAULT_DENY },
+ "$confdir/.htaccess" => { perms => WS_SERVE,
+ contents => HT_DEFAULT_DENY },
"$datadir/.htaccess" => { perms => WS_SERVE,
contents => HT_DEFAULT_DENY },
"$error_reports/.htaccess" => { perms => WS_SERVE,