PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

{ETA: Bug/security?} Members Cannot Download TEXT Files

s2Member Plugin. A Membership plugin for WordPress®.

{ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Xandria » 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:
  • 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.
User avatar
Xandria
Registered User
Registered User
 
Posts: 14
Joined: January 3, 2012
Location: Canada

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Raam Dev » January 9th, 2012, 10:42 pm

Have you tried adding the file extension (.txt) to WP Admin -> s2Member -> Download Options -> Inline File Extensions?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Xandria » January 10th, 2012, 12:25 pm

Greetings.

I did and no dice. The good news is my clients will never need to download .txt files. I simply made a poor choice in my file type to test! ;-)

Everything is working great though and the more I play with this plugin the more I love it. I'll be making a purchase for the Pro version (while my needs are covered by the free version, the creators really deserve my money for this product) in the next week or so.

Thanks for responding.
User avatar
Xandria
Registered User
Registered User
 
Posts: 14
Joined: January 3, 2012
Location: Canada

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Raam Dev » January 11th, 2012, 12:05 pm

Thanks for the KUDOS! :)

I'll pass this thread along to the development team to see if they can shed any light on why that's happening with .txt files.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Xandria » January 11th, 2012, 5:43 pm

My pleasure. I'm excited to get this going (but need to spend some serious time organizing our insanely complicated membership first); hopefully next week.

Insofar as the .txt files go, I'm suspecting it's a security measure of some sort (whether intentional or now, who knows LOL). But I would be curious... no rush. Thanks. Cheers.
User avatar
Xandria
Registered User
Registered User
 
Posts: 14
Joined: January 3, 2012
Location: Canada

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Jason Caldwell » January 15th, 2012, 12:07 am

Thanks for the heads up on this thread, and thanks for reporting this important issue.

Files that contain the word Readme.txt, are often blocked by a master server configuration, either by your hosting company, or by your httpd.conf file for Apache. Have you been able to reproduce this error on any text file that does NOT contain the word "Readme"?
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Xandria » January 15th, 2012, 12:13 pm

Hi Jason,

I had thought that security had something to do with this behaviour. Curiously, when I changed the name to "other.txt", it won't download either. Again, for me, not an issue, but perhaps something interesting to you.

Let me know if I can be of further assistance.

Cheers.
User avatar
Xandria
Registered User
Registered User
 
Posts: 14
Joined: January 3, 2012
Location: Canada

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Jason Caldwell » January 15th, 2012, 12:38 pm

Thank you for the follow-up.
Interesting. Well, I can confirm that it's not s2Member enforcing that restriction. As you've suggested, I would suspect a server configuration against txt files somewhere. You might take a look inside your .htaccess files, contacting your hosting company; or, if you're running a dedicated server, reviewing your Apache configuration for anything that would block access to txt files.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: {ETA: Bug/security?} Members Cannot Download TEXT Files

Postby Xandria » January 15th, 2012, 1:18 pm

Thanks so much for the clarification, Jason. I'm sure that information will help others who discover this oddity as well.

I'm recovering from surgery this week and plan to spend some of that time purchasing and setting up s2Member. What I've experimented with -- just awesome. Our needs are fairly complex as I'm delighted this fits the bill and is so customizable. Thank you for all your efforts!
User avatar
Xandria
Registered User
Registered User
 
Posts: 14
Joined: January 3, 2012
Location: Canada


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron