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