From b9c748cb794ab41424db260d3048ba877f547803 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 26 Apr 2017 12:39:36 -0400 Subject: Clean up here-docs here-docs should either be at indent level 0 (and stored in constants) or replaced with other forms of quoting that can be idented more readibly. --- Bugzilla/Install/Filesystem.pm | 133 ++++++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 69 deletions(-) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index c67823d7a..fef17fec2 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -43,12 +43,62 @@ our @EXPORT = qw( fix_file_permissions ); -use constant HT_DEFAULT_DENY => < <<'EOT'; # nothing in this directory is retrievable unless overridden by an .htaccess # in a subdirectory deny from all EOT +use constant HT_GRAPHS_DIR => <<'EOT'; +# Allow access to .png and .gif files. + + Allow from all + + +# And no directory listings, either. +Deny from all +EOT + +use constant HT_WEBDOT_DIR => <<'EOT'; +# Restrict access to .dot files to the public webdot server at research.att.com +# if research.att.com ever changes their IP, or if you use a different +# webdot server, you'll need to edit this + + Allow from 192.20.225.0/24 + Deny from all + + +# Allow access to .png files created by a local copy of 'dot' + + Allow from all + + +# And no directory listings, either. +Deny from all +EOT + +use constant HT_ASSETS_DIR => <<'EOT'; +# Allow access to .css and js files + + Allow from all + + +# And no directory listings, either. +Deny from all +EOT + +use constant INDEX_HTML => <<'EOT'; + + + + + + +

I think you are looking for index.cgi

+ + +EOT + ############### # Permissions # ############### @@ -316,18 +366,7 @@ sub FILESYSTEM { # Because checksetup controls the creation of index.html separately # from all other files, it gets its very own hash. my %index_html = ( - 'index.html' => { perms => WS_SERVE, contents => < - - - - - -

I think you are looking for index.cgi

- - -EOT - } + 'index.html' => { perms => WS_SERVE, contents => INDEX_HTML } ); # Because checksetup controls the .htaccess creation separately @@ -358,48 +397,12 @@ EOT contents => HT_DEFAULT_DENY }, "$error_reports/.htaccess" => { perms => WS_SERVE, contents => HT_DEFAULT_DENY }, - - "$graphsdir/.htaccess" => { perms => WS_SERVE, contents => < - Allow from all - - -# And no directory listings, either. -Deny from all -EOT - }, - - "$webdotdir/.htaccess" => { perms => WS_SERVE, contents => < - Allow from 192.20.225.0/24 - Deny from all - - -# Allow access to .png files created by a local copy of 'dot' - - Allow from all - - -# And no directory listings, either. -Deny from all -EOT - }, - - "$assetsdir/.htaccess" => { perms => WS_SERVE, contents => < - Allow from all - - -# And no directory listings, either. -Deny from all -EOT - }, - + "$graphsdir/.htaEcess" => { perms => WS_SERVE, + contents => HT_GRAPHS_DIR }, + "$webdotdir/.htaccess" => { perms => WS_SERVE, + contents => HT_WEBDOT_DIR }, + "$assetsdir/.htaccess" => { perms => WS_SERVE, + contents => HT_ASSETS_DIR }, ); Bugzilla::Hook::process('install_filesystem', { @@ -481,14 +484,10 @@ sub update_filesystem { } elsif (-e 'index.html') { my $templatedir = bz_locations()->{'templatedir'}; - print <