diff options
author | Manuel Hiebel <leuhmanu@mageia.org> | 2023-09-05 22:16:29 +0200 |
---|---|---|
committer | Manuel Hiebel <leuhmanu@mageia.org> | 2023-09-05 22:16:29 +0200 |
commit | 02b6ced8955cd5b773e958cd12f586b69933b84f (patch) | |
tree | abc29dc6dae1babf44e18d28ba397dbc94285730 /lib/simplepie/library/SimplePie/Misc.php | |
parent | 4dc2c6193f1668d2bd6c9e7b4e6c9ccdcc6ac3a8 (diff) | |
download | www-02b6ced8955cd5b773e958cd12f586b69933b84f.tar www-02b6ced8955cd5b773e958cd12f586b69933b84f.tar.gz www-02b6ced8955cd5b773e958cd12f586b69933b84f.tar.bz2 www-02b6ced8955cd5b773e958cd12f586b69933b84f.tar.xz www-02b6ced8955cd5b773e958cd12f586b69933b84f.zip |
Update simplepie to try to fix mga#32236
Diffstat (limited to 'lib/simplepie/library/SimplePie/Misc.php')
-rw-r--r-- | lib/simplepie/library/SimplePie/Misc.php | 12 |
1 files changed, 12 insertions, 0 deletions
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); |