Fix SsrfProtectionTest

This commit is contained in:
FreeScout
2026-09-29 05:34:32 -07:00
parent 0f87c3e50f
commit 11663cf58d
2 changed files with 2 additions and 2 deletions

View File

@@ -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'];
}
}

View File

@@ -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);
}
}
}