diff options
Diffstat (limited to 'config/default.rules')
| -rw-r--r-- | config/default.rules | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/config/default.rules b/config/default.rules index 6e443ea..6fac367 100644 --- a/config/default.rules +++ b/config/default.rules | |||
| @@ -7,9 +7,6 @@ sp.disable_xxe.enable(); | |||
| 7 | # use SameSite on session cookie | 7 | # use SameSite on session cookie |
| 8 | sp.cookie.name("PHPSESSID").samesite("lax"); | 8 | sp.cookie.name("PHPSESSID").samesite("lax"); |
| 9 | 9 | ||
| 10 | # Always verify certificates | ||
| 11 | sp.curl_verify_certificates.enable(); | ||
| 12 | |||
| 13 | # Harden the `chmod` function | 10 | # Harden the `chmod` function |
| 14 | sp.disable_function.function("chmod").param("mode").value_r("^[0-9]{2}[67]$").drop(); | 11 | sp.disable_function.function("chmod").param("mode").value_r("^[0-9]{2}[67]$").drop(); |
| 15 | 12 | ||
| @@ -91,7 +88,13 @@ sp.disable_function.function("is_callable").param("var").value("passthru").drop( | |||
| 91 | # sp.disable_function.function("mysqli_query").ret("FALSE").drop(); | 88 | # sp.disable_function.function("mysqli_query").ret("FALSE").drop(); |
| 92 | # sp.disable_function.function("PDO::query").ret("FALSE").drop(); | 89 | # sp.disable_function.function("PDO::query").ret("FALSE").drop(); |
| 93 | 90 | ||
| 91 | # Ensure that certificates are properly verified | ||
| 92 | sp.disable_function.function("curl_setopt").param("value").value("1").allow(); | ||
| 93 | sp.disable_function.function("curl_setopt").param("value").value("2").allow(); | ||
| 94 | # `81` is SSL_VERIFYHOST and `64` SSL_VERIFYPEER | ||
| 95 | sp.disable_function.function("curl_setopt").param("option").value("64").drop().alias("Please don't turn CURLOPT_SSL_VERIFYCLIENT off."); | ||
| 96 | sp.disable_function.function("curl_setopt").param("option").value("81").drop().alias("Please don't turn CURLOPT_SSL_VERIFYHOST off."); | ||
| 97 | |||
| 94 | #File upload | 98 | #File upload |
| 95 | sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); | 99 | sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); |
| 96 | sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop(); | 100 | sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop(); |
| 97 | |||
