public function RequestSanitizerTest::providerTestSanitizedDestinations in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php \Drupal\Tests\Core\Security\RequestSanitizerTest::providerTestSanitizedDestinations()
- 10 core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php \Drupal\Tests\Core\Security\RequestSanitizerTest::providerTestSanitizedDestinations()
Data provider for testing sanitized destinations.
File
- core/
tests/ Drupal/ Tests/ Core/ Security/ RequestSanitizerTest.php, line 332
Class
- RequestSanitizerTest
- Tests RequestSanitizer class.
Namespace
Drupal\Tests\Core\SecurityCode
public function providerTestSanitizedDestinations() {
$data = [];
// External URL without scheme is not allowed.
$data[] = [
'//example.com/test',
];
// External URL is not allowed.
$data[] = [
'http://example.com',
];
return $data;
}