Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / To limit upload file of type .EXE

To limit upload file of type .EXE

Locked

Views: 2,672

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
1 Nov 2006, 8:40 PM
#1
man_world avatar

man_world

New Zenner

Join Date:
Sep 2006
Posts:
9
Plugin Contributions:
0

To limit upload file of type .EXE

Hi Everybody, I have a question, I dont Know if that is possible, when I upload a image for a Category or Producto, I can too upload file of any type, for example EXE, How Can I limit that...:unsure:

2 Nov 2006, 5:41 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: To limit upload file of type .EXE

In the v1.3.x series, you can limit upload filetypes by setting the option in
Admin->Configuration->Maximum Values->Allowed Filename Extensions for uploading

.
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.

1 Dec 2006, 2:05 PM
#3
swfw avatar

swfw

New Zenner

Join Date:
Nov 2006
Posts:
12
Plugin Contributions:
0

Re: To limit upload file of type .EXE

I have the same problem, by default this configuration is ok. but still the user can upload any file, for example .exe in my configuration only allow image, but the system allow upload anything, there is something else to modify ?

1 Dec 2006, 2:16 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: To limit upload file of type .EXE

What version of Zen Cart are you running?

In the Configuration ... Maximum Values ... I have set the defaults:

Allowed Filename Extensions for uploading
List the permissible filetypes (filename extensions) to be allowed when files are uploaded to your site by customers. Separate multiple values with commas(,). Do not include the dot(.).

Suggested setting: "jpg,jpeg,gif,png,eps,cdr,ai,pdf,tif,tiff,bmp,zip"

As exe is not in this list, the file cannot be uploaded and I receive an error message for trying when I add to cart ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Dec 2006, 2:17 PM
#5
swfw avatar

swfw

New Zenner

Join Date:
Nov 2006
Posts:
12
Plugin Contributions:
0

Re: To limit upload file of type .EXE

I tried to modify the file upload.php , but it only allow to put 1 extension
( ** $extensions = ' gif '** ) this example work ok. but if I put ( $extensions = 'gif,jpg,jpeg,png' ) dont work
and in the Admin->Configuration->Maximum Values->Allowed Filename Extensions for uploading. I made the right extension but dont work too. :no:
How can i do ? the system allow anything......

1 Dec 2006, 2:20 PM
#6
swfw avatar

swfw

New Zenner

Join Date:
Nov 2006
Posts:
12
Plugin Contributions:
0

Re: To limit upload file of type .EXE

Waoo !! your are fast :cool: !! only pass one minute and you answered, Thank you:D

1 Dec 2006, 2:22 PM
#7
swfw avatar

swfw

New Zenner

Join Date:
Nov 2006
Posts:
12
Plugin Contributions:
0

Re: To limit upload file of type .EXE

I have 1.3.6 right now I dont sure which the path in admin, but made the change.....

5 Dec 2006, 1:16 AM
#8
swfw avatar

swfw

New Zenner

Join Date:
Nov 2006
Posts:
12
Plugin Contributions:
0

Re: To limit upload file of type .EXE