aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Feed.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-03-09 08:41:47 +0100
committerGravatar GitHub <noreply@github.com> 2021-03-09 08:41:47 +0100
commitb7fdfbb89421322e0ec15beb10f4260f33afd31e (patch)
tree4dbf3e25a9940c50cac66194343525674f8c04c5 /app/Models/Feed.php
parentef4a826e345e2eb7c0013617b3f07cc53ef22ed8 (diff)
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
Diffstat (limited to 'app/Models/Feed.php')
-rw-r--r--app/Models/Feed.php4
1 files changed, 3 insertions, 1 deletions
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() {