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 .GIFfiles so far), you can verify that the file type uploaded is a .JPG or .GIF filebefore the file is even written to the hard drive. This should help limit thatpotential problem (of course, if you used a Mac for a server, you probably wouldnot 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 [getcharsstart=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:
> 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 .GIFfiles so far), you can verify that the file type uploaded is a .JPG or .GIF filebefore the file is even written to the hard drive. This should help limit thatpotential problem (of course, if you used a Mac for a server, you probably wouldnot 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 [getcharsstart=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:
off topic - dna snipets (1997)
upgrade? (1997)
Extended [ConvertChars] (1997)
user submitted data REPOST (2000)
Seeking WebCat Bulletin Board (1999)
Custom WebCat Prefs ... (1997)
still having shipCost.db Problem (1997)
WebCat2b12--[searchstring] bug (1997)
SendMail context not working on CentOS 4 (2007)
Ok here is a question? (1997)
European Dates (1998)
Backwards list behavior ... (1997)
[BULK] [WebDNA] [BULK] WebDNA 7 - Ready or Not ?? I'm not sure... (2011)
Clean Code: Rules for inserting keyboard returns? (1997)
Can't add a field (1998)
Need help with Shipping/Price discounts (1998)
WebSTAR/WebCatalog losing files (2000)
Help! WebCat2 bug (1997)
emailer (1997)
For those of you not on the WebCatalog Beta... (1997)