From d7b03719b9bb890bf219c26483f2a76228ba4c80 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Mon, 16 Oct 2017 11:57:45 +0200 Subject: [PATCH] Miglioramento della protezione delle cartelle Miglioramento della protezione delle cartelle del gestionale (file .htaccess) e ottimizzazione degli assets della libreria PHPDebug Bar. --- .htaccess | 20 ++++++++++---------- gulpfile.js | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.htaccess b/.htaccess index 16151bc7d..e730f4ca2 100644 --- a/.htaccess +++ b/.htaccess @@ -38,18 +38,18 @@ php_value post_max_size 20M SetEnv HTTP_MOD_REWRITE On # Deny access to protected folders - RewriteRule ^backup/?$ - [F,L] - RewriteRule ^docs/?$ - [F,L] - RewriteRule ^include/?$ - [F,L] - RewriteRule ^locale/?$ - [F,L] - RewriteRule ^logs/?$ - [F,L] - RewriteRule ^update/?$ - [F,L] + RewriteRule ^backup/ - [F,L] + RewriteRule ^docs/ - [F,L] + RewriteRule ^include/ - [F,L] + RewriteRule ^locale/ - [F,L] + RewriteRule ^logs/ - [F,L] + RewriteRule ^update/ - [F,L] # Deny access to svn, git, node_modules and vendor folders - RewriteRule ^.git/?$ - [F,L] - RewriteRule ^.svn/?$ - [F,L] - RewriteRule ^node_modules/?$ - [F,L] - RewriteRule ^vendor/?$ - [F,L] + RewriteRule ^.git/ - [F,L] + RewriteRule ^.svn/ - [F,L] + RewriteRule ^node_modules/ - [F,L] + RewriteRule ^vendor/ - [F,L] # Prevent hacks # proc/self/environ? no way! diff --git a/gulpfile.js b/gulpfile.js index d23d3d325..d02234e90 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -229,6 +229,7 @@ gulp.task('i18n', function () { gulp.task('php-debugbar', function () { gulp.src([ './vendor/maximebf/debugbar/src/DebugBar/Resources/**/*', + '!./vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/**/*', ]) .pipe(gulpIf('*.css', minifyCSS(), gulpIf('*.js', minifyJS()))) .pipe(gulp.dest(config.production + '/php-debugbar')); @@ -247,6 +248,7 @@ gulp.task('release', function () { './vendor/mpdf/mpdf/iccprofiles/*', './vendor/mpdf/mpdf/qrcode/*', './vendor/mpdf/mpdf/ttfonts/*', + './vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/*', ]); var output = fs.createWriteStream('./release.zip');