From 57f4d8e58f5a0e95cf3c0ee1a14fbc30cb4114d7 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 11 Nov 2021 13:01:03 +0100 Subject: [PATCH] Fix #81604: Parse_url wrong hostname detection --- reference/url/functions/parse-url.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/reference/url/functions/parse-url.xml b/reference/url/functions/parse-url.xml index b8f378e9cb..8ffc12ad5a 100644 --- a/reference/url/functions/parse-url.xml +++ b/reference/url/functions/parse-url.xml @@ -252,11 +252,15 @@ array(3) { &reftitle.notes; - + - This function may not give correct results for relative URLs. + This function may not give correct results for relative or invalid URLs, + and the results may not even match common behavior of HTTP clients. + If URLs from untrusted input need to be parsed, extra validation is + required, e.g. by using filter_var with the + FILTER_VALIDATE_URL filter. - + This function is intended specifically for the purpose of parsing URLs