Преглед изворни кода

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 пре 11 година
родитељ
комит
01a1179b1a
1 измењених фајлова са 1 додато и 1 уклоњено
  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.
  * @return the same URL without HTTP credentials.
  */
  */
 function url_remove_credentials($url) {
 function url_remove_credentials($url) {
-	return preg_replace('#((.+)://)((.+)@)?(.+)#', '${1}${5}', $url);
+	return preg_replace('/[^\/]*:[^:]*@/', '', $url);
 }
 }