readthedocs / readthedocs.org

The source code that powers readthedocs.org
https://readthedocs.org/
MIT License
8.04k stars 3.58k forks source link

403 Reading File That We Have Been Reading for Years #11615

Closed oleibman closed 1 month ago

oleibman commented 1 month ago

Details

Expected Result

We have an Excel spreadsheet that points to an image https://phpspreadsheet.readthedocs.io/en/latest/topics/images/01-03-filter-icon-1.png Excel opens this file, including the image correctly. Until today, PhpSpreadsheet did as well (by using file_get_contents on the URL). Today, we get error 403 - Failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden. We also get such an error using stable or master instead of latest. Can you tell us what happened to cause this problem?

Expect result = read file contents.

Actual Result

Error 403.

humitos commented 1 month ago

The image you linked loads correctly to me.

oleibman commented 1 month ago

Yes, it loads correctly in a browser, and in Excel. But the following command gets a 403:

php -r "file_get_contents('https://phpspreadsheet.readthedocs.io/en/latest/topics/images/01-03-filter-icon-1.png');"

This had worked correctly till yesterday. The Php release is unchanged.

humitos commented 1 month ago

Ah OK. Unfortunately, I can't help you with PHP. You will need to debug this more deeply to understand what's going on behind the scenes. If there is an issue with that URL we can fix it, but you will need to isolate the problem outside PHP.

oleibman commented 1 month ago

Thank you for the suggestion. I have raised the issue with Php (see linked issue above), and they have a suggestion which seems to work. I am waiting for more details, but you appear to be off the hook.

oleibman commented 1 month ago

I am still befuddled by what changed, but don't see a reason to keep the issue open.