Fix SsrfProtectionTest
This commit is contained in:
@@ -2242,7 +2242,7 @@ class Helper
|
||||
if (!empty($dns_record['ip']) && !in_array($dns_record['ip'], $hosts_to_check)) {
|
||||
$hosts_to_check[] = $dns_record['ip'];
|
||||
// Remember IP.
|
||||
if (!in_array( $dns_record['ip'], self::$last_request['ips'])) {
|
||||
if (!in_array($dns_record['ip'], self::$last_request['ips'])) {
|
||||
self::$last_request['ips'][$host][] = $dns_record['ip'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class SsrfProtectionsTest extends TestCase
|
||||
'example.org' => 'https://example.org',
|
||||
];
|
||||
foreach ($test_hosts as $host => $result) {
|
||||
$this->assertEquals($result, \Helper::checkUrlIpAndHost('https://'.$host), $host);
|
||||
$this->assertEquals($result, \Helper::checkUrlHost('https://'.$host), $host);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user