-
Notifications
You must be signed in to change notification settings - Fork 101
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
Properly handle file paths with sites/:id
#1963
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! There's a minor readability suggestion, otherwise looks good!
This needs to be re-thought because of changes in #1975 We can probably handle the stripping to unpublished-files instead since that's the only thing impacted right now. |
Those need to be stripped out as well since the files paths are stored in postmeta without it.
79e9e31
to
caf97ee
Compare
Re-thought and should be all good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjangda there's a couple of notes, mostly chores/clerical stuff, but I feel like it's better to address this right away for the sake of our future selves.
r1379-stacks |
Those need to be stripped out as well since the files paths are stored in postmeta without it.
Changelog Description
Private Files: Handle
/sites/
paths for Private FilesWe've added a fix that properly handles files with a subsite path (e.g.
/wp-content/uploads/sites/4/2021/01/unpublished.jpg
) with our Private Files feature. We now strip thesites/:id
portion of the path before forwarding the request to WordPress.Checklist
Please make sure the items below have been covered before requesting a review:
Steps to Test
See unit tests.