وضاحت
RB Cloak Media Files protects your WordPress media library by replacing real filenames with cryptographically secure cloaks. This prevents unauthorised users from discovering your private files through URL guessing, brute‑forcing, or enumeration attacks.
If your website contains sensitive, private, or paid content (course materials, client documents, downloadable assets, membership content, or internal resources), your media folder may be more exposed than you think. WordPress stores every uploaded file under a predictable path (/uploads/yyyy/mm/filename.ext). Anyone who knows or guesses a filename can access it directly, even without a user account.
RB Cloak Media Files solves this by giving every protected file a unique, unpredictable identifier that cannot be enumerated. The original filename is stored safely in post meta, so you never lose track of your data.
Who is this plugin for?
- Membership, LMS, and course creators who deliver paid digital content.
- Agencies and professionals who store private client files in WordPress.
- Creators selling digital downloads, templates, assets, or media packs.
- Internal or intranet sites that must prevent casual file discovery.
- Any website that wants stronger media security without complex setups.
What problem does RB Cloak Media Files solve?
WordPress never checks permissions when serving files directly from /uploads/.
Anyone with the URL can access the file, even if the content is:
* behind a paywall
* visible only to logged‑in users
* restricted to specific roles
* attached to private or draft posts
RB Cloak Media Files prevents this by replacing the original filenames with secure cloaks, making URLs impossible to guess. This dramatically reduces the risk of:
- URL enumeration
- brute‑forced filename discovery
- leaking sensitive client files
- unauthorised downloads
- scraping or hotlinking
Key Features
- Automatically cloak new uploads with secure random filenames.
- Manually cloak, re‑cloak, or uncloak files from the Media Library.
- Optional original‑name prefix for SEO‑friendly cloaks (e.g.,
image-xxxxx.jpg). - Configurable cloak length (short, medium, or long).
- Optional Unix timestamp for guaranteed uniqueness.
- Inline status badges in the Media Library.
- Filter by cloak status (Cloaked / Uncloaked / Pending).
- Dashboard with live statistics.
- Works with core WordPress functions (
wp_get_attachment_url(),the_post_thumbnail(), etc.).
RB Cloak Media Files is lightweight, fast, and designed to work seamlessly with any theme or plugin. No complex setup: activate and your new uploads are protected immediately.
انسٽاليشن
- Upload the plugin files to the
/wp-content/plugins/rb-cloak-media-filesdirectory, or install through the WordPress Plugins screen directly. - Activate the plugin through the Plugins screen in WordPress.
- Use the RB Cloak Media Files Settings screen to configure the plugin.
FAQ
-
Will cloaking break existing embedded images or links?
-
Yes. Cloaking renames the physical file and changes its public URL. Any content already referencing the old URL (post content, page builders, custom fields) will need to be updated. Standard WordPress template functions (
wp_get_attachment_url(),the_post_thumbnail(), etc.) update automatically. -
Is this plugin compatible with WooCommerce?
-
Yes, cloaking product images and WooCommerce images will work automatically since WooCommerce uses default WP attachment functions.
-
Can I restore the original filename?
-
Yes. Use the Uncloak action from the Media Library row-actions or from the attachment edit screen.
-
Is the original filename stored anywhere?
-
Yes. The original filename is stored as post meta and is always visible in the Media Library title column and on the edit-attachment screen.
جائزا
ھن پلگ ان لاءِ ڪي به رايا ناھن.
تعاون ڪندڙ & ڊولپرز
“RB Cloak Media Files” اوپن سورس سافٽ ويئر آهي. ھيٺين ماڻھن ھن پلگ ان ۾ حصو ورتو آھي.
تعاون ڪندڙترجمو ڪريو “RB Cloak Media Files” توهان جي ٻولي ۾.
ڊولپمينٽ ۾ دلچسپي؟
ڪوڊ براؤز ڪريو، چيڪ ڪريو SVN مخزن، يا رڪنيت حاصل ڪريو ڊولپمينٽ لاگ پاران RSS.
لاگ تبدیل ڪريو
1.0.7
- Fixed: large images (over 2560px) were only partially cloaked. The full-resolution original and every generated thumbnail kept their original filenames and stayed reachable at guessable URLs. All derived files, including image-editor backups, are now renamed.
- Fixed: media library search could return posts of any type and status.
- Security: cloak, re-cloak and uncloak now require permission to edit the specific attachment, not just the general upload capability.
- Upload cloaking runs on
wp_handle_upload_prefilterinstead of the globalsanitize_file_namefilter, so filename sanitisation elsewhere in WordPress is left untouched. - Every file rename is verified to stay inside the WordPress uploads directory; attachments stored elsewhere are skipped rather than renamed.
- Prefixed all remaining JavaScript globals and attachment-model keys.
- Replaced a PHP 8
matchexpression that broke the declared PHP 7.4 minimum. - Fixed a fatal error when saving settings with no values posted.
- Media library badge data is now scoped to the current page instead of the whole library.
- Added an uninstall routine that removes the plugin’s option and post meta.
- Dashboard statistics are cached and purged whenever media changes.
- readme and admin label corrections.
1.0.6
- Follow-up corrections to the 1.0.5 release.
1.0.5
- Path handling and upload-hook adjustments.
1.0.4
- Plugin Rename
1.0.3
- Code revision
1.0.2
- Renamed internal terminology from “hash” to “cloak” for clarity.
- Improved PHPCS compliance.
1.0.1
- Initial public release.
1.0.0
- First release.
