Explorar o código

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 %!s(int64=11) %!d(string=hai) anos
pai
achega
01a1179b1a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
 }