Opened 10 years ago
Closed 10 years ago
#28748 closed enhancement (wontfix)
Add an action hook before file loading process for Multisite medias starts in wp-includes/ms-files.php
Reported by: | ShinichiN | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Media | Keywords: | |
Focuses: | multisite | Cc: |
Description
My suggestion is adding a action hook in wp-includes/ms-files.php so that plugins can stop or do something before the file loading process begins.
I wanted to limit access to files if visitor is not logged in to the network.
Attachments (1)
Change History (5)
#1
@
10 years ago
Can you expand on how you want to "limit access to files to non-logged in users"? There's probably a way to do this already, which wouldn't require a new hook.
All files are publicly accessible if someone has the URL. You would need to do something at the .htaccess level to change this.
#2
@
10 years ago
- Keywords close added
Providing some sort of method of password protection for static assets is appealing, though if handled through ms-files.php, it would likely be security through obscurity as the files all have static locations.
As ms-files was deprecated in 3.5 - see #19235 - and per #20527, we likely won't be adding enhancements to the current core ms-files. As nacin mentions in that ticket - "Rather than using wp-includes/ms-files.php, you could always use wp-content/ms-files.php and change your rewrite rules."
#3
@
10 years ago
Thank you ericlewis and jeremy felt.
I'll have a look at /wp-content/ms-files.php to change rewrites.
First patch