We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a936e8 commit 18b54a2Copy full SHA for 18b54a2
ext/filter/logical_filters.c
@@ -484,10 +484,6 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
484
}
485
s++;
486
487
-
488
- if (*(e - 1) == '.') {
489
- goto bad_url;
490
- }
491
492
493
if (
ext/filter/tests/bug64441.phpt
@@ -0,0 +1,11 @@
1
+--TEST--
2
+bug 64441, FILTER_VALIDATE_URL will invalidate a hostname that ended by dot
3
+--SKIPIF--
4
+<?php if (!extension_loaded("filter")) die("skip"); ?>
5
+--FILE--
6
+<?php
7
+var_dump(filter_var('http://example.com./', FILTER_VALIDATE_URL));
8
+var_dump(filter_var('http://example.com/', FILTER_VALIDATE_URL));
9
+--EXPECT--
10
+string(20) "http://example.com./"
11
+string(19) "http://example.com/"
0 commit comments