Skip to content

File,Psr18Client: Remove support for local files - #994

Merged
jtojnar merged 4 commits into
masterfrom
wip/jtojnar/no-file-requests
Nov 2, 2026
Merged

jtojnar merged 4 commits into
masterfrom
wip/jtojnar/no-file-requests

Conversation

@jtojnar

@jtojnar jtojnar commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

This can lead to information leaks when discovery/redirects are triggered.

Partially fixes: #968


Stack created with GitHub Stacks CLI • Give Feedback 💬

@Art4

Art4 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

We could refer to set_raw_data() instead?

Comment thread CHANGELOG.md Resolved
@jtojnar
jtojnar force-pushed the wip/jtojnar/no-file-requests branch from aabdf5e to 715562c Compare October 29, 2026 09:47
@jtojnar

jtojnar commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

We could refer to set_raw_data() instead?

I wanted to do that initially but then I decided that the initial fetch is probably fine and keeping that will lead to less potential BC breaks (see #993). But I can drop that as well, if you think it is better.

@jtojnar
jtojnar force-pushed the wip/jtojnar/no-file-requests branch 2 times, most recently from ce531e3 to e1ae160 Compare November 2, 2026 00:37
@jtojnar

jtojnar commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

After consulting with @jgalea, I have decided to drop it from set_feed_url as well.

@jtojnar
jtojnar requested a review from Art4 November 2, 2026 00:37
@jtojnar jtojnar added this to the 1.10.0 milestone Nov 2, 2026
We are going to remove support for local files from `File`.

Let’s obtain the contents ourselves and then populate a dummy `File`
from the manually constructed response.

It should be fine to use it for the legacy non-namespaced `LocatorTest`
since `Locator`, not `File`, is the unit under test.
This can lead to giving access to local files if a path is passed to `set_feed_url` instead of URL.

It can be replaced by passing the contents of the file, obtained e.g. using `file_get_contents` to `SimplePie::set_raw_data()`.

Mostly reverts 15fc743
@jtojnar
jtojnar force-pushed the wip/jtojnar/no-file-requests branch from e1ae160 to 9a64876 Compare November 2, 2026 21:58
Base automatically changed from wip/jtojnar/local-req to master November 2, 2026 22:01
@jtojnar
jtojnar merged commit 9a64876 into master Nov 2, 2026
27 checks passed
@jtojnar
jtojnar deleted the wip/jtojnar/no-file-requests branch November 2, 2026 22:01
Alkarex added a commit to FreshRSS/simplepie that referenced this pull request Nov 13, 2026
Merge upstream
Resolving conflicts with:
* Require PHP 7.4 or newer simplepie#1006
* File,Psr18Client: Remove support for local files simplepie#994
Alkarex added a commit to FreshRSS/FreshRSS that referenced this pull request Nov 14, 2026
In particular:
* File,Psr18Client: Remove support for local files simplepie/simplepie#994
* Parser: ignore whitespace before the XML declaration simplepie/simplepie#1005
* Require PHP 7.4 or newer simplepie/simplepie#1006, simplepie/simplepie#992
* Parser: treat https Atom 1.0 namespace as Atom simplepie/simplepie#1010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should we filter for SSRF by default?

2 participants