diff --git a/roles/nginx/templates/drupal_common.j2 b/roles/nginx/templates/drupal_common.j2 index 36593f8b6..c198a8f90 100644 --- a/roles/nginx/templates/drupal_common.j2 +++ b/roles/nginx/templates/drupal_common.j2 @@ -111,11 +111,11 @@ location = /robots.txt { } # Deny listed requests for security reasons. -# location ~* (?:delete.+from|insert.+into|select.+from|union.+select|onload|\.php.+src|system\(.+|document\.cookie|\;|\.\.) { -# return 403; -# } +location ~* (?:delete.+from|insert.+into|select.+from|union.+select|onload|\.php.+src|system\(.+|document\.cookie|\;|\.\.) { + return 403; +} # Deny listed requests for security reasons. -# location ~* (/\..*|settings\.php$|settings\.php\..*$|web\.config|composer\..*|\.(?:git|htaccess|engine|inc|info|install|module|profile|pl|po|sh|.*sql|theme|tpl(?:\.php)?|xtmpl)$|^(?:Entries.*|Repository|Root|Tag|Template))$ { -# return 403; -#} +location ~* (/\..*|settings\.php$|settings\.php\..*$|web\.config|composer\..*|\.(?:git|htaccess|engine|inc|info|install|module|profile|pl|po|sh|.*sql|theme|tpl(?:\.php)?|xtmpl)$|^(?:Entries.*|Repository|Root|Tag|Template))$ { + return 403; +}