xref: /PHP-8.1/ext/filter/tests/bug81122.phpt (revision a5538c62)
1--TEST--
2Bug #81122 (SSRF bypass in FILTER_VALIDATE_URL)
3--SKIPIF--
4<?php
5if (!extension_loaded('filter')) die("skip filter extension not available");
6?>
7--FILE--
8<?php
9$urls = [
10    "https://example.com:\\@test.com/",
11    "https://user:\\epass@test.com",
12    "https://user:\\@test.com",
13];
14foreach ($urls as $url) {
15    var_dump(filter_var($url, FILTER_VALIDATE_URL));
16}
17?>
18--EXPECT--
19bool(false)
20bool(false)
21bool(false)
22