{ETA: Bug/security?} Members Cannot Download TEXT Files
Posted: January 7th, 2012, 11:22 pm
Greetings,
I'm one of those who knows enough to be dangerous where WP and plugins are concerned. I often have issues with the basics, so I do apologize in advance for inflicting this cry for help upon you. But hopefully someone can point me in the right direction.
I set up a test site (http://testing.speakeasysolutions.com).
I set up various options, successfully tested showing graphics served from protected directories, specific posts etc. pertaining to member levels and also custom capabilities.
HOWEVER, do you think I can so much as serve up a file? I'm missing something and I've no idea what. As with posts and inline images, I need files to be downloadable based on member level and/or custom capabilities.
I created a number of directories:
Within each directory I placed a text file named "SeSReadme.txt" (as part of my test).
Then I added the following code into a post that requires level 1 access:
Download <a title="download" href="http://testing.speakeasysolutions.com/wp-content/plugins/s2member-files/dragon-v11/SeSReadme.txt">this</a>.
Download <a title="download" href="http://testing.speakeasysolutions.com/?s2member_file_download=dragon-v11/SeSReadme.txt">this second one</a>.
Download <a title="download" href="http://testing.speakeasysolutions.com/?s2member_file_download=SeSReadme.txt">this third one</a>.
Download <a title="download" href="http://testing.speakeasysolutions.com/?s2member_file_download=access-s2member-level1/SeSReadme.txt">this fourth one</a>.
The problem:
IE says it cannot display the page (yes, I do get prompted to confirm the file download).
Firefox does nothing (same prompt for download).
When I right click the link and try to save, the message reads: "The download cannot be saved because an unknown error occurred" in Firefox and "SeSReadme_txt couldn't be downloaded" in IE.
Am I missing a piece of code? Have aliens abducted my last brain cell? I'm feeling right silly about this.
Thank you for your time. Truly.
Sincerely,
X.
EDITED TO ADD
I just discovered something... I have replicated the above with a PDF and ZIP and it works as expected! Therefore, I can only conclude that .txt files cannot be downloaded this way. I suspect this is a security feature or it could be a bug (I doubt bug as this system is amazing) -- I'd be curious to know though if anyone would like to explain.
It's just my luck that I choose a .txt to experiment with! Well, I'm relieved at least.
I'm one of those who knows enough to be dangerous where WP and plugins are concerned. I often have issues with the basics, so I do apologize in advance for inflicting this cry for help upon you. But hopefully someone can point me in the right direction.
I set up a test site (http://testing.speakeasysolutions.com).
I set up various options, successfully tested showing graphics served from protected directories, specific posts etc. pertaining to member levels and also custom capabilities.
HOWEVER, do you think I can so much as serve up a file? I'm missing something and I've no idea what. As with posts and inline images, I need files to be downloadable based on member level and/or custom capabilities.
I created a number of directories:
- s2member-files/access-s2member-level0
- s2member-files/access-s2member-level1
- s2member-files/access-s2member-level2
- s2member-files/ccap-dragon-v12
- s2member-files/dragon-v11
Within each directory I placed a text file named "SeSReadme.txt" (as part of my test).
Then I added the following code into a post that requires level 1 access:
Download <a title="download" href="http://testing.speakeasysolutions.com/wp-content/plugins/s2member-files/dragon-v11/SeSReadme.txt">this</a>.
Download <a title="download" href="http://testing.speakeasysolutions.com/?s2member_file_download=dragon-v11/SeSReadme.txt">this second one</a>.
Download <a title="download" href="http://testing.speakeasysolutions.com/?s2member_file_download=SeSReadme.txt">this third one</a>.
Download <a title="download" href="http://testing.speakeasysolutions.com/?s2member_file_download=access-s2member-level1/SeSReadme.txt">this fourth one</a>.
The problem:
IE says it cannot display the page (yes, I do get prompted to confirm the file download).
Firefox does nothing (same prompt for download).
When I right click the link and try to save, the message reads: "The download cannot be saved because an unknown error occurred" in Firefox and "SeSReadme_txt couldn't be downloaded" in IE.
Am I missing a piece of code? Have aliens abducted my last brain cell? I'm feeling right silly about this.
Thank you for your time. Truly.
Sincerely,
X.
EDITED TO ADD
I just discovered something... I have replicated the above with a PDF and ZIP and it works as expected! Therefore, I can only conclude that .txt files cannot be downloaded this way. I suspect this is a security feature or it could be a bug (I doubt bug as this system is amazing) -- I'd be curious to know though if anyone would like to explain.
It's just my luck that I choose a .txt to experiment with! Well, I'm relieved at least.