Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Simple Site] .txt files are only downloadable for logged in users. [403: Access Denied] #57411

Open
Greatdane opened this issue Oct 28, 2021 · 14 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Media The media screen in Calypso, general media management, or integration with third party media. Groundskeeping Issues handled through Dotcom Groundskeeping rotations [Pod] Flow Patrol (Manage) [Pri] Low Address when resources are available. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@Greatdane
Copy link

Quick summary

.txt files are able to be uploaded to a WordPress.com site but they cannot be downloaded by users who are not logged in to WordPress.com

The following message is shown instead.

— 403: Access Denied —

This file requires authorization:

You must be logged in
and a member of this blog.
Log in to proceed.

I tried various other file types (such as .zip and .pdf) and they can be downloaded by anybody with the link.

As .txt files are relatively secure, I can only assume this is a bug affecting this file type only?

This only affects Simple Sites.

Steps to reproduce

  1. Add a .txt file either to the Media Library or the File Block of your Simple site.
  2. Copy the URL for the file.
  3. Log out WordPress.com or open a new browser/incognito window.
  4. Open the URL. You will get a 403: Access Denied error.

What you expected to happen

I would expect the `.txt. file to open like any other file that is uploadable to WordPress.com

What actually happened

The file is not viewable unless logged in to a WordPress.com account.

Context

Customer report;
p2EDhh-1mg-p2
4406715-zd-woothemes

Operating System

No response

Browser

No response

Simple, Atomic or both?

Simple

Theme-specific issue?

No response

Other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

Yes, easy to implement

Workaround details

Host the file on a different site (such as Google Drive).

@Greatdane Greatdane added [Type] Bug When a feature is broken and / or not performing as intended User Report labels Oct 28, 2021
@dpasque dpasque added [Feature] Media The media screen in Calypso, general media management, or integration with third party media. [Pod] Flow Patrol (Manage) [Pri] Low Address when resources are available. labels Oct 28, 2021
@vipulpradhan
Copy link

User report: 4831460-zen
Suggested workaround to host the file on Google Drive.

@annbingle
Copy link

Same issue here 35360684-hc . However the user is using PDF instead and it only affects the mobile. The same issue with a simple site and after it was moved to AT. As a workaround I had them host the PDF files in Google Drive instead.

@jorpdesigns
Copy link

Reported in 7873243-zen

Copy link

github-actions bot commented Mar 19, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 4406715-zen
  • 4831460-zen
  • 7873243-zen
  • 9043186-zen
  • 9333449-zen
  • 9346531-zen
  • 9356040-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Mar 19, 2024
@allilevine
Copy link
Member

allilevine commented Nov 15, 2024

Reported in 9043186-zen

@Greatdane
Copy link
Author

9333449-zd-a8c

@rickmgithub
Copy link

9333449-zd-a8c
9346531-zd-a8c

@philnick206
Copy link

Reported in 9356040-zd-a8c

@supernovia supernovia moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Feb 3, 2025
@supernovia
Copy link
Contributor

📌 REPRODUCTION RESULTS

  • Tested on Simple – Replicated
  • Tested on Atomic – Could Not Replicate

📌 FINDINGS/SCREENSHOTS/VIDEO
Note I was logged in with a WordPress.com test account unassociated with the sites that had a .txt upload

📌 ACTIONS

  • Triaged

@dsas
Copy link
Contributor

dsas commented Feb 5, 2025

Some discussion on this: p1738598495170769-slack-C03N25JPCE4

@andres-blanco
Copy link
Contributor

The code that prevents txt's being downloaded is to prevent an exploit. The details can be seen in the code linked by Dean in the Slack link.

I feel like this one should be closed since there are workarounds and doesn't feel worth the effort. But not 100% sure, @candy02058912 , what do you think?

@andres-blanco andres-blanco added the Groundskeeping Issues handled through Dotcom Groundskeeping rotations label Feb 5, 2025
@Greatdane
Copy link
Author

If so, @donalirl we will need to update the Accepted File Types support doc to sat TXT files are on Business plans and above only (which sounds so strange! )

@donalirl
Copy link

donalirl commented Feb 6, 2025

@Greatdane could you please log the request here 🙏

@andres-blanco
Copy link
Contributor

I did a follow-up with Security folks p1738846788359259-slack-C02DF688P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Media The media screen in Calypso, general media management, or integration with third party media. Groundskeeping Issues handled through Dotcom Groundskeeping rotations [Pod] Flow Patrol (Manage) [Pri] Low Address when resources are available. [Type] Bug When a feature is broken and / or not performing as intended
Projects
Development

No branches or pull requests