Media Protection Instability
-
Installed Membership 2 Free last December and used it to protect a PDF file so that only members could download it. Worked like a charm for a long time. Then suddenly it stopped working and only showed the ‘Forbidden’ error for logged-in users. After lots of somewhat random diddling around without success, finally arrived at this set of conditions for testing: Cacheing OFF at Cloudflare.com which handles my DNS and also OFF through my hosting provider’s Cpanel; no cacheing WordPress plugins are being used. Used two test machines, one running Windows 7 and the other Windows 10 (no differences in any responses between them were ever noticed); used Chrome’s Incognito Window feature to test the pasted-in link to the PDF as a non-logged-in user. All WordPress plugins are updated, my two test computers scanned for viruses using AVG Free and found clean. Performed a global reset to default of all the site’s file permissions twice through my hosting provider’s Cpanel, with no noticeable effects, the Linux permission on the PDF is -rw-r–r– and the permission on all containing subdirectories is the same: drwxr-r-xr-x. These are the contents of wp-content/uploads/.htaccess:
## Membership 2 - Media Protection ## Options -Indexes Deny from all <FilesMatch '\.(jpg|jpeg|png|gif|mp3)$'> Order Allow,Deny Allow from all </FilesMatch> ## Membership 2 - End ## The 'Link to the page you need help with' is to the relevant PDF file which should of course always show the Forbidden error for non-logged-in users. Feel free to create an account on the homepage of https://nukewar.info, validate your email, and see if you are then allowed to download the PDF titled 'Antinuclear Nutrition' from the Account page after you login. Turning OFF the Media Protection slider switch found on the upper right corner of the Media Protection popup on the Membership Add-ons page makes the PDF instantly accessible to both logged-in and non-logged-in users, pretty well identifying the culprit as Membership 2. Changing to any of the three Protection Methods on the popup where that switch is also found does absolutely nothing, the default link is always produced (I am assuming that function was once called “Mask download URL” as described by user Nik (@nikbond) who reported similar but not identical problems with Media Protection a year ago, as I do not find the words “Mask download URL” anywhere in the current version of Membership 2). The strangest behavior of all was noticed at one point when the PDF file briefly became accessible to non-logged-in users but was still Forbidden for logged-in users! It didn't stay that way for very long though, and nothing was changed on the site, my browser, or on Cloudflare other than refreshing the page for the logged-in user and the non-logged-in user in an Incognito window. After two or three refreshes of each, the original bad behavior of not working for either returned. Some potentially relevant data: System Overview =============== WP Version: 5.1.1 PHP Version: 7.3.0 Database Version: 10.2.17-MariaDB Client IP Address: ***redacted*** Server IP Address: ***redacted*** Server Load: 6.64, 7.45, 7.53 Server Load Average: 7.207 PHP Memory Usage: 8% (42.47M of 512M) WordPress Info ============== WP Version: 5.1.1 Active Theme: Twenty Sixteen, Version 1.5 WP Memory Limit: 40 MB WP Remote Post: Enabled WP Debug Mode: Disabled WP Debug Log: Disabled WP Debug Display: Enabled WP Debug Script: Disabled Query Logging: Enabled Disallow File Edit: Disabled Allow Core Auto Update: Disabled WP DB Hostname: localhost WP DB Name: ***redacted*** Active Plugins: 16 WP Language: English / en_US Advanced Caching: Disabled External Object Cache: Disabled WordPress Time: 2019-04-12 23:20:08 Update Method: Direct access allowed Client Info =========== Platform: Windows 7 : 64 bit Browser: Chrome IP Address: ***redacted*** User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 Hostname: ***redacted*** Client Port: 55063 Server Info ============ OS/Server: Linux ***redacted*** 3.10.0-714.10.2.lve1.5.19.3.el7.x86_64 #1 SMP Tue Aug 7 21:33:29 EDT 2018 x86_64 Server Software: Apache Server Version: 64Bit Server Address: 31.170.161.38 Server Port: 80 Document Root: /home/***redacted***/public_html Server Name: nukewar.info Server Load: 6.64, 7.45, 7.53 Load Average: 7.207 Server Signature: Disabled Apache Modules: mod_rewrite, mod_mime, mod_headers, mod_expires, mod_auth_basic Server Protocol: HTTP/1.1 HTTP Connection: Keep-Alive Server Gateway: n/a Server Time: 2019-04-13 03:20:08 Database Info ============= Database: MariaDB Server Version: 10.2.17-MariaDB Uptime: 67 days, 13 hours, 0 minutes, 20 seconds Hostname: us-imm-web136.main-hosting.eu Charset: utf8 PHP Info ======== PHP Version: 7.3.0 Zend Engine: 3.3.0-dev PHP Memory Limit (runtime / server): 512M / 512M PHP Memory Usage: 8% (42.8M of 512M) PHP Peak Memory Usage: 44.5M PHP Post Max Size: 256M PHP Upload Max File Size: 256M PHP Execution Time Limit: 240s PHP Input Time Limit: 240s PHP Max Input Vars: 1000 PHP Include Path: /home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/archive_tar:/home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/console_getopt:/home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/http_request2:/home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/mail_mime:/home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/mail_mime-decode:/home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/net_url2:/home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/pear-core-minimal/src:/home/***redacted***/public_html/wp-content/plugins/backwpup/vendor/pear/pear_exception:.:/opt/alt/php73/usr/share/pear PHP Allow URL File Open: Enabled PHP File Uploads: Enabled Session: Enabled Session Name: PHPSESSID Cookie Path: / Save Path: /opt/alt/php73/var/lib/php/session Use Cookies: Enabled Use Only Cookies: Enabled Loaded Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, PDO, pdo_mysql, fileinfo, wddx, sysvsem, bcmath, Phar, xmlwriter, redis, sockets, json, igbinary, exif, sysvshm, sysvmsg, mysqli, dom, mysqlnd, pdo_sqlite, xmlreader, posix, xsl open_basedir: fsockopen: Enabled cURL: Enabled SOAP Client: Disabled Short Open Tag: Enabled Security Info ============= Register Globals: Disabled Safe Mode: Disabled Display Errors: Disabled allow_url_include: Disabled allow_url_fopen: Enabled Magic Quotes: Disabled Server Signature: Disabled WP Unique Keys: Enabled mod_security: Disabled open_basedir: Disabled upload_tmp_dir: /tmp expose_php: Enabled
- This topic was modified 5 years, 7 months ago by . Reason: added 'Free' for clarity
- This topic was modified 5 years, 7 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Media Protection Instability’ is closed to new replies.