32 : Generator
33 {
34 yield 'Host matches configured HTTP path (no `allowed_hosts` configuration)' => [
35 'server_data' => [
36 'HTTP_HOST' => 'localhost',
37 'REQUEST_URI' => '/login.php',
38 ],
39 'http_path' => 'http://localhost',
40 'wsdl_path' => 'https://localhost/soap/server.php?wsdl=1',
41 'allowed_hosts' => '',
42 ];
43
44 yield 'Host matches configured WSDL path (no `allowed_hosts` configuration)' => [
45 'server_data' => [
46 'HTTP_HOST' => 'soap.ilias.de',
47 'REQUEST_URI' => '/login.php',
48 ],
49 'http_path' => 'https://test.ilias.de',
50 'wsdl_path' => 'https://soap.ilias.de/soap/server.php?wsdl=1',
51 'allowed_hosts' => '',
52 ];
53
54 yield 'Localhost is always allowed (no `allowed_hosts` configuration)' => [
55 'server_data' => [
56 'HTTP_HOST' => 'localhost',
57 'REQUEST_URI' => '/login.php',
58 ],
59 'http_path' => 'https://test.ilias.de',
60 'wsdl_path' => 'https://test.ilias.de/soap/server.php?wsdl=1',
61 'allowed_hosts' => '',
62 ];
63
64 yield 'Host is in `allowed_hosts` list' => [
65 'server_data' => [
66 'HTTP_HOST' => 'test2.ilias.de',
67 'REQUEST_URI' => '/login.php',
68 ],
69 'http_path' => 'https://test.ilias.de',
70 'wsdl_path' => 'https://test.ilias.de/soap/server.php?wsdl=1',
71 'allowed_hosts' => 'test2.ilias.de',
72 ];
73 }