Parcourir la source

Improve url_remove_credentials

Use @aledeg old function instead

See https://github.com/FreshRSS/FreshRSS/pull/715
See https://github.com/FreshRSS/FreshRSS/issues/711
Marien Fressinaud il y a 11 ans
Parent
commit
01a1179b1a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lib/lib_rss.php

+ 1 - 1
lib/lib_rss.php

@@ -437,5 +437,5 @@ function array_remove(&$array, $value) {
  * @return the same URL without HTTP credentials.
  */
 function url_remove_credentials($url) {
-	return preg_replace('#((.+)://)((.+)@)?(.+)#', '${1}${5}', $url);
+	return preg_replace('/[^\/]*:[^:]*@/', '', $url);
 }