summaryrefslogtreecommitdiff
path: root/src/tests/broken_configuration/encrypt_key_too_short.phpt
diff options
context:
space:
mode:
authorBen Fuhrmannek2021-11-11 12:02:07 +0100
committerBen Fuhrmannek2021-11-11 12:02:07 +0100
commit9111fdf5e6332923a5faf9f8a7e6b428eb91795a (patch)
tree046703d4a95f8590a01e8a82631d3c061a6c2865 /src/tests/broken_configuration/encrypt_key_too_short.phpt
parent8e95c5d30f197716ba132e3f2494c5e220f3e5cd (diff)
detect dummy or short encryption key
Diffstat (limited to 'src/tests/broken_configuration/encrypt_key_too_short.phpt')
-rw-r--r--src/tests/broken_configuration/encrypt_key_too_short.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/broken_configuration/encrypt_key_too_short.phpt b/src/tests/broken_configuration/encrypt_key_too_short.phpt
new file mode 100644
index 0000000..fe80be1
--- /dev/null
+++ b/src/tests/broken_configuration/encrypt_key_too_short.phpt
@@ -0,0 +1,23 @@
1--TEST--
2Cookie encryption key too short
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_encryption_key_short.ini
7--COOKIE--
8--ENV--
9return <<<EOF
10REMOTE_ADDR=2001:0db8:0000:0000:0000:fe00:0042:8329
11HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36
12HTTPS=1
13EOF;
14--FILE--
15<?php
16?>
17--EXPECT--
18PHP Fatal error: [snuffleupagus][2001:0db8:0000:0000:0000:fe00:0042:8329][config][log] The encryption key set on line 1 is too short. please use at least 10 bytes in Unknown on line 0
19
20Fatal error: [snuffleupagus][2001:0db8:0000:0000:0000:fe00:0042:8329][config][log] The encryption key set on line 1 is too short. please use at least 10 bytes in Unknown on line 0
21
22Fatal error: [snuffleupagus][2001:0db8:0000:0000:0000:fe00:0042:8329][config][log] Invalid configuration file in Unknown on line 0
23Could not startup. \ No newline at end of file