mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-78215 core: Added support unit test
This commit is contained in:
parent
69596a6bb2
commit
bd5329b1a5
@ -135,6 +135,11 @@ class curl_security_helper_test extends \advanced_testcase {
|
||||
// Test when DNS resolution fails.
|
||||
[[], "http://example.com", "127.0.0.1", "", true],
|
||||
|
||||
// Test ensures that the default value of getremoteaddr() 0.0.0.0 will check against the provided blocked list.
|
||||
[$simpledns, "http://0.0.0.0/x.png", "0.0.0.0", "", true],
|
||||
// Test set using IPV4 with integer format.
|
||||
[$simpledns, "http://2852039166/x.png", "169.254.169.254", "", true],
|
||||
|
||||
// Test some freaky deaky Unicode domains. Should be blocked always.
|
||||
[$simpledns, "http://169。254。169。254/", "127.0.0.1", "", true],
|
||||
[$simpledns, "http://169。254。169。254/", "1.2.3.4", "", true],
|
||||
|
Loading…
x
Reference in New Issue
Block a user