Re: Image size & weight limit on upload

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 41235
interpreted = N
texte = > Thanks for the thorough help there. :o) I had everything finished up > until the size check which as you say must be done after the file is > uploaded. Is that how all languages allow it or is this just webCat? > This seems to not be very secure. In the leeway time between uploading > and deletion something could happen compliments of a stealthy hacker,If you are only accepting image files (and I have only done with .JPG and .GIF files so far), you can verify that the file type uploaded is a .JPG or .GIF file before the file is even written to the hard drive. This should help limit that potential problem (of course, if you used a Mac for a server, you probably would not need to worry anyway). Here's what you can do (I will rewrite the whole [formvariables] section):[text]ext=NA[/text] [text]write=T[/text] [formvariables] [showif [url][name][/url]^[url]image[/url]] [showif [getchars start=1&end=3][value][/getchars]^gif] [text]ext=gif[/text] [/showif] [showif [getchars start=1&end=12][url][value][/url][/getchars]^%FF%D8%FF%E0] [text]ext=jpg[/text] [/showif] [showif [ext]=NA[/text] [math show=F]errors=[errors]+1[/math] [text]write=F[/text] [/showif] [showif [image]=] [math show=F]errors=[errors]+1[/math] [text]write=F[/text] [/showif] [hideif [write]=F] [writefile file=../images/filename.[ext]][value][/writefile] [/hideif] [/showif] [/formvariables] Dennis------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Image size & weight limit on upload (Kenneth Grome 2002)
  2. Re: Image size & weight limit on upload (Dennis J. Bonsall, Jr. 2002)
  3. Re: Image size & weight limit on upload (Dennis J. Bonsall, Jr. 2002)
  4. Re: Image size & weight limit on upload (Alisha Outridge 2002)
  5. Image size & weight limit on upload (Alisha Outridge 2002)
  6. Addition: Image size tags (Jason Tyler 2000)
  7. Image size tags (Jason Tyler 2000)
> Thanks for the thorough help there. :o) I had everything finished up > until the size check which as you say must be done after the file is > uploaded. Is that how all languages allow it or is this just webCat? > This seems to not be very secure. In the leeway time between uploading > and deletion something could happen compliments of a stealthy hacker,If you are only accepting image files (and I have only done with .JPG and .GIF files so far), you can verify that the file type uploaded is a .JPG or .GIF file before the file is even written to the hard drive. This should help limit that potential problem (of course, if you used a Mac for a server, you probably would not need to worry anyway). Here's what you can do (I will rewrite the whole [formvariables] section):[text]ext=NA[/text] [text]write=T[/text] [formvariables] [showif [url][name][/url]^[url]image[/url]] [showif [getchars start=1&end=3][value][/getchars]^gif] [text]ext=gif[/text] [/showif] [showif [getchars start=1&end=12][url][value][/url][/getchars]^%FF%D8%FF%E0] [text]ext=jpg[/text] [/showif] [showif [ext]=NA[/text] [math show=F]errors=[errors]+1[/math] [text]write=F[/text] [/showif] [showif [image]=] [math show=F]errors=[errors]+1[/math] [text]write=F[/text] [/showif] [hideif [write]=F] [writefile file=../images/filename.[ext]][value][/writefile] [/hideif] [/showif] [/formvariables] Dennis------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Dennis J. Bonsall, Jr.

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

SwitchNotFoundDEFAULT (2003) Using Plug-In while running 1.6.1 (1997) Why did this copyfile stop working? (2004) process SSI (1998) Replace Statement (1997) Not really WebCat (1997) WC1.6 to WC2 date formatting (1997) Re1000001: Setting up shop (1997) PCS Frames (1997) Merging LineItems (2003) searches with dash, period etc. (2000) Multiple cart additions (1997) NTbeta18 corrupted? (1997) OT: BulkRegister.com (2002) Shopping carts and reloading pages (1997) Date Formats (1997) multiple record replace (2001) Too Much Rootbeer Free Offer (1997) searching with if/then (2004) Separate SSL Server (1997)