Skip to content

SimplePie prevent cache pollution#3502

Merged
Alkarex merged 13 commits intoFreshRSS:masterfrom
Alkarex:simplepie-prevent-cache-polution
Mar 9, 2021
Merged

SimplePie prevent cache pollution#3502
Alkarex merged 13 commits intoFreshRSS:masterfrom
Alkarex:simplepie-prevent-cache-polution

Conversation

@Alkarex
Copy link
Member

@Alkarex Alkarex commented Mar 6, 2021

Retrieving a feed with distinct cURL parameters such as user-agent might give different responses, which should not share the same cache:
#fix #3367 (comment)
#fix #3494 (comment)

@Alkarex Alkarex added this to the 1.18.0 milestone Mar 6, 2021
$simplePie = new SimplePie();
$simplePie->set_useragent(FRESHRSS_USERAGENT);
$simplePie->set_syslog(FreshRSS_Context::$system_conf->simplepie_syslog_enabled);
$simplePie->set_cache_name_function('sha1');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight upgrade from md5 (no need to be crypto-safe, but good to reduce risks of collision)

@Alkarex Alkarex marked this pull request as draft March 6, 2021 23:41
@Alkarex Alkarex marked this pull request as ready for review March 7, 2021 22:09
@Alkarex Alkarex changed the title SimplePie prevent cache polution SimplePie prevent cache pollution Mar 7, 2021
@Alkarex
Copy link
Member Author

Alkarex commented Mar 9, 2021

Let's merge to get some testing

@Alkarex Alkarex merged commit b7fdfbb into FreshRSS:master Mar 9, 2021
@Alkarex Alkarex deleted the simplepie-prevent-cache-polution branch March 9, 2021 07:41
Alkarex added a commit to FreshRSS/simplepie that referenced this pull request Mar 28, 2021
Retrieving a feed with distinct cURL parameters such as user-agent might give different responses, which should not share the same cache.

Follow-up and generalisation of simplepie#643

The code to get the cache filename is extracted in its own new fuction `SimplePie::get_cache_filename($url)` so that clients can easily get this information as well.

Downstream PR: FreshRSS/FreshRSS#3502
@Alkarex
Copy link
Member Author

Alkarex commented Mar 28, 2021

Upstream PR: simplepie/simplepie#675

mblaney pushed a commit to simplepie/simplepie that referenced this pull request Apr 12, 2021
Retrieving a feed with distinct cURL parameters such as user-agent might give different responses, which should not share the same cache.

Follow-up and generalisation of #643

The code to get the cache filename is extracted in its own new fuction `SimplePie::get_cache_filename($url)` so that clients can easily get this information as well.

Downstream PR: FreshRSS/FreshRSS#3502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant