diff options
| author | Christian Göttsche | 2023-12-13 20:37:42 +0100 |
|---|---|---|
| committer | Julien Voisin | 2023-12-13 22:32:49 +0100 |
| commit | 3c720bec3a78775f37839256cfc4b2fea1348550 (patch) | |
| tree | 5231fd396c26896cf4b7eb5657fe504c0444b1bb /src/tests/ini/ini_regexp_drop_base64.phpt | |
| parent | fed8c8f180b275147940b1c6bf8f2c95dfb1ada2 (diff) | |
print key and value on INI violations
On violations of INI settings include the key and if appropriate the
value in the log message. This helps to locate offenders and fine tune
the configuration itself.
Diffstat (limited to 'src/tests/ini/ini_regexp_drop_base64.phpt')
| -rw-r--r-- | src/tests/ini/ini_regexp_drop_base64.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/ini/ini_regexp_drop_base64.phpt b/src/tests/ini/ini_regexp_drop_base64.phpt new file mode 100644 index 0000000..32076d5 --- /dev/null +++ b/src/tests/ini/ini_regexp_drop_base64.phpt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --TEST-- | ||
| 2 | INI protection .min() + .drop(), log base64 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print("skip"); ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/sp.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | var_dump(ini_set("user_agent", "Foo\n\r") === false); | ||
| 10 | var_dump(ini_get("user_agent")); | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][ini_protection][drop] INI value `Rm9vCg0=`(base64) for `user_agent` does not match regex in %a/ini_regexp_drop_base64.php on line 2%A%A%A%A | ||
