Forums / Upgrading from 1.3.x to 1.3.9 / .htaccess problems with media previews in music products

.htaccess problems with media previews in music products

Locked

Views: 1,347

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
21 Apr 2010, 9:07 PM
#1
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

.htaccess problems with media previews in music products

I am wondering if there is a better solution to provide similar security offer by the different .htaccess included with 1.3.9.

At the moment the new .htaccess is causing more headaches than helping.

I just noticed in our log today that the server was filling up with errors like:

[error] [client 61.135.249.120] client denied by server configuration: //media/csmus0901/8.wma*

The problem is resulting from the new .htaccess file in media folder.

This line ```
<FilesMatch ".*.(js|css|jpg|gif|png|html)$">


So for example, in the media folder one needs to add things like wma, ra, rm, ram, etc.

I think there should be a note in the installation guide to warning users about this.
21 Apr 2010, 11:57 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: .htaccess problems with media previews in music products

BlessIsaacola:

the new .htaccess file in media folder.

This line ```
<FilesMatch ".*.(js|css|jpg|gif|png|html)$">

> 
> So for example, in the media folder one needs to add things like wma, ra, rm, ram, etc.Yes, that is correct, as explained inside the .htaccess file itself.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Apr 2010, 12:32 AM
#3
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: .htaccess problems with media previews in music products

DrByte:

Yes, that is correct, as explained inside the .htaccess file itself.

DrByte, I completely understand! Is there an alternative situation to secure some of those folders like media that's doesn't require manual intervention. The thought of remembering to update the .htaccess file with new file types for the different folder is too much for my brain :) I guess a person could take the time and add all possible file type that could be in a specific folder now and in the future.

Well, at least the solution is an easy one to get things moving along. I am just glad I was checking the server log today to see all the customers we were frustrating.

22 Apr 2010, 12:43 AM
#4
qdixon avatar

qdixon

Support Team

Join Date:
Feb 2004
Location:
Simcoe, Ontario, Canada
Posts:
1,906
Plugin Contributions:
1

Re: .htaccess problems with media previews in music products

BlessIsaacola, as you requested that I look into this via another post, I agree with DrByte.

You will need to make the file extention additions if you are adding non stock items. I wish there was a better way of this but it seems this is the best way to do it for right now. Give it some time and a new better way could be incorporated in the future.

Security is a finiky thing and is never ending. The idea of denying everything and only accepting certain files is a very secure method and is widely used in cisco hardware and firewalls among many others.

It can be a pain in the bum and redundant...but, when it comes down to being hacked; this little thing could be your savior.

Windows, BSD, Linux, Cisco, Hardware & IT Security Tech
AEIIA - Zen Cart Certified & PCI Compliant Hosting

22 Apr 2010, 12:49 AM
#5
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: .htaccess problems with media previews in music products

Thanks to both of you for the prompt responses. One last question.

If I have folders like:

media/music
media/video/
media/books/

do I just put the .htaccess in media folder and it will apply to all sub-folders or do I have to do each sub-folder as well?

Thanks!

22 Apr 2010, 12:51 AM
#6
qdixon avatar

qdixon

Support Team

Join Date:
Feb 2004
Location:
Simcoe, Ontario, Canada
Posts:
1,906
Plugin Contributions:
1

Re: .htaccess problems with media previews in music products

Htaccess will cover subfolders

Windows, BSD, Linux, Cisco, Hardware & IT Security Tech
AEIIA - Zen Cart Certified & PCI Compliant Hosting