xref: /php-src/ext/filter/tests/bug81122.phpt (revision 218a93b8)
1--TEST--
2Bug #81122 (SSRF bypass in FILTER_VALIDATE_URL)
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7$urls = [
8    "https://example.com:\\@test.com/",
9    "https://user:\\epass@test.com",
10    "https://user:\\@test.com",
11];
12foreach ($urls as $url) {
13    var_dump(filter_var($url, FILTER_VALIDATE_URL));
14}
15?>
16--EXPECT--
17bool(false)
18bool(false)
19bool(false)
20