summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt
blob: 354d3db9a3097fc392404067b440a89d40c134ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Disable functions - Ensure that server certificates validation can't be disabled
--SKIPIF--
<?php
if (!extension_loaded("snuffleupagus")) { print("skip"); }
if (!extension_loaded("curl")) { print("skip"); }
?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--EXTENSIONS--
curl
--INI--
sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
--FILE--
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, '1');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0');
echo "1337";
?>
--EXPECTF--
Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d