latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Restricted Folder

Home Forums Community Forum Restricted Folder

This topic contains 5 replies, has 4 voices. Last updated by  Cristián Lávaque 4 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 27th, 2012 at 2:18 am #9177

Hi,
I like to provide digital version of my client’s magazine using 3D ISSUE (3dissue.com). 3D issue basically takes a PDF of the magazine and creates a bunch of Flash and HTML5 files (about 100MB for 80 pages). The software creates a simple html file that calls out the “SWF” flash file in its subfolder. I don’t have any problems uploading the full digital magazine folder to a public folder and view it online. I’m trying to post this for paid subscribers only.

So, is the best solution for my situation uploading the files for each issue into the s2member-files folder and then call the index.html like this? mydomain.com/?s2member_file_download=issue1/index.html

I have already added htm, html, jpeg, swf, png to the inline list to make sure it loads it in the browser and not pop up the download option.

\s2member-files\issue1
\s2member-files\issue1\index.html
\s2member-files\issue1\supporting_swf_html5_files\
\s2member-files\issue1\supporting_swf_html5_files\file.swf

one problem this is causing me is that the files that are being called from the index.html file have relative url (supporting_swf_html_files\file.swf). So, the index.html gets confused because it doesnt know the full path since it was called out by s2member’s secure url. So, i went ahead and added mydomain.com/?s2member_file_download=issue1/supporting_swf_html_files to the urls inside index.html to fix that issue, but that doesn’t work 100%.

Is there a better implementation of what I’m trying to achieve?

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Tuesday Mar 27th, 2012 at 4:58 am #9183

Can you do this?

Create page:
http://www.example.com/issue1/ and protect that with s2member, then within that page link to the content with absolute url’s
\s2member-files\issue1\supporting_swf_html5_files\
\s2member-files\issue1\supporting_swf_html5_files\file.swf

those file are protected because they are in \s2member-files\

I don’t think its necessary to put the actual page in the protected folder

Posted: Tuesday Mar 27th, 2012 at 8:05 am #9208
Staff Member

Using a BASE HREF tag in your HTML file might do the trick.
See also: http://www.primothemes.com/forums/viewtopic.php?f=4&t=14643&p=32789#p32717

Posted: Sunday Apr 1st, 2012 at 9:03 pm #9724

thanks for the tips. I wasn’t able to use either one.

Another possible solution may be using URI Request restrictions. Is the security level of URI Request restriction as good as files in the s2member-files folder?

Which one is more secure or are both 100% secure for specified membership levels:

http://www.domain.com/?s2member_file_download=folder555/index.html
vs.
http://www.domain.com/folder555/index.html (after restricting uri request “folder555” for certain membership level.

I created folder555 in root using the FTP client.

Posted: Sunday Apr 1st, 2012 at 10:21 pm #9726

ok. I just figured out from older posts that according to Jason, URI request restriction only applies to WordPress “content” and not files.

Then URI is not a workaround. Now, the question is:

1. is it safe to use the full s2member-files path to call restricted files or is the whole security deal implemented with the /?s2member_file_download=filename.html calling.

ie is it safe to point to a restricted address with a static URL: http://www.mydomain.com/wp-content/plugins/s2member-files/filename.html ? is it safe to reveal the full path (wp-content/plugins/etc…) to the whole world even though they must be logged in to access it anyway?

2. I’m an intermediate PHP developer, would I be able to move the s2member-files folder to something like this (www.mydomain.com/restricted-files)?

Posted: Tuesday Apr 3rd, 2012 at 6:01 am #9855

2. I’m an intermediate PHP developer, would I be able to move the s2member-files folder to something like this (www.mydomain.com/restricted-files)?

This should help with that: http://www.primothemes.com/forums/viewtopic.php?f=36&t=2719#p8017

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.