mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-78215 core: Added support unit test
This commit is contained in:
parent
429c403c3f
commit
fdb80ffc40
@ -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