From 02b6ced8955cd5b773e958cd12f586b69933b84f Mon Sep 17 00:00:00 2001 From: Manuel Hiebel Date: Tue, 5 Sep 2023 22:16:29 +0200 Subject: Update simplepie to try to fix mga#32236 --- lib/simplepie/library/SimplePie/Misc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/simplepie/library/SimplePie/Misc.php') diff --git a/lib/simplepie/library/SimplePie/Misc.php b/lib/simplepie/library/SimplePie/Misc.php index a52498ac7..4318573ba 100644 --- a/lib/simplepie/library/SimplePie/Misc.php +++ b/lib/simplepie/library/SimplePie/Misc.php @@ -2260,4 +2260,16 @@ function embed_wmedia(width, height, link) { { // No-op } + + /** + * Sanitize a URL by removing HTTP credentials. + * @param string $url the URL to sanitize. + * @return string the same URL without HTTP credentials. + */ + public static function url_remove_credentials($url) + { + return preg_replace('#^(https?://)[^/:@]+:[^/:@]+@#i', '$1', $url); + } } + +class_alias('SimplePie_Misc', 'SimplePie\Misc', false); -- cgit v1.2.1