diff options
| author | 2015-01-29 10:57:11 +0100 | |
|---|---|---|
| committer | 2015-01-29 10:57:11 +0100 | |
| commit | 8ff3e5363d28dff2eed6d7f152921ed093196a04 (patch) | |
| tree | aca9a5f25b6190a135af4fb5143bf80442f3bd0e /app/Models/Feed.php | |
| parent | e078f9fdac8f666e2d2aad1b1cc8ba3aadb68ab2 (diff) | |
Use url_remove_credentials to log URL
See https://github.com/FreshRSS/FreshRSS/issues/711
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 74869bf11..5ce03be5d 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -240,19 +240,16 @@ class FreshRSS_Feed extends Minz_Model { $subscribe_url = $feed->subscribe_url(true); } + $clean_url = url_remove_credentials($subscribe_url); if ($subscribe_url !== null && $subscribe_url !== $url) { - if ($this->httpAuth != '') { - // on enlève les id si authentification HTTP - $subscribe_url = preg_replace('#((.+)://)((.+)@)(.+)#', '${1}${5}', $subscribe_url); - } - $this->_url($subscribe_url); + $this->_url($clean_url); } if (($mtime === true) ||($mtime > $this->lastUpdate)) { - Minz_Log::notice('FreshRSS no cache ' . $mtime . ' > ' . $this->lastUpdate . ' for ' . $subscribe_url); + Minz_Log::notice('FreshRSS no cache ' . $mtime . ' > ' . $this->lastUpdate . ' for ' . $clean_url); $this->loadEntries($feed); // et on charge les articles du flux } else { - Minz_Log::notice('FreshRSS use cache for ' . $subscribe_url); + Minz_Log::notice('FreshRSS use cache for ' . $clean_url); $this->entries = array(); } |
