From cc766aa37076f4169e392ec9397457ab0d61c23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Mon, 5 Dec 2022 09:53:02 +0100 Subject: [PATCH] feat(.htaccess): add file --- .htaccess | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..52dde39 --- /dev/null +++ b/.htaccess @@ -0,0 +1,82 @@ +# File inspired from getgrav/grav +# SPDX-License-Identifier: MIT (Copyright 2021 Grav) + + + +RewriteEngine On + +## Begin - Exploits +# If you experience problems on your site block out the operations listed below +# This attempts to block the most common type of exploit `attempts` +# +# Block out any script trying to use twig tags in URL. +RewriteCond %{REQUEST_URI} ({{|}}|{%|%}) [OR] +RewriteCond %{QUERY_STRING} ({{|}}|{%25|%25}) [OR] +# Block out any script trying to base64_encode data within the URL. +RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] +# Block out any script that includes a