소스 검색

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.
  */
 function url_remove_credentials($url) {
-	return preg_replace('#((.+)://)((.+)@)?(.+)#', '${1}${5}', $url);
+	return preg_replace('/[^\/]*:[^:]*@/', '', $url);
 }