From b7fdfbb89421322e0ec15beb10f4260f33afd31e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 9 Mar 2021 08:41:47 +0100 Subject: SimplePie prevent cache pollution (#3502) * SimplePie prevent cache polution #fix https://github.com/FreshRSS/FreshRSS/pull/3367#issuecomment-766250249 #fix https://github.com/FreshRSS/FreshRSS/pull/3494#issuecomment-790113663 * Fix bug * Minor improvement * Update cache filename in FreshRSS (1/2) * cacheFilename temp * New SimplePie get_cache_filename() * Fix typos * Update lib/SimplePie/SimplePie.php Typo * Include user-agent and timeout * fix array_merge * Declaration * force_feed was lost in a commit --- app/Models/Feed.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/Models') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 7f52ba52f..af9c54719 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -497,7 +497,9 @@ class FreshRSS_Feed extends Minz_Model { } protected function cacheFilename() { - return CACHE_PATH . '/' . md5($this->url) . '.spc'; + $simplePie = customSimplePie($this->attributes()); + $filename = $simplePie->get_cache_filename($this->url); + return CACHE_PATH . '/' . $filename . '.spc'; } public function clearCache() { -- cgit v1.2.3