Hi Aaron,

Just a side note, I wouldn't look at data types as a security feature. If
you're receiving user input you'd much rather run a regex or other
validation to catch invalid inputs (along with queryparam'ing in your SQL or
using SP's) as it is much easier to trap the errors. Last thing you want is
for an end user to be able to throw a ColdFusion error with a malformed URL
string!

Also, "" is indeed a string, it just isn't a number which is what Nolan was
saying, so it would error on any kind of numeric data type validation.

Best Wishes,
Peter

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Aaron Roberson
Sent: Friday, June 23, 2006 2:20 PM
To: CFCDev@cfczone.org
Subject: Re: [CFCDev] Need Help with Arguments in CFCs


Nolan,

I am running ColdFusion 7 on my development machine where I am having the
problem. I mentioned that I used default values of 0 and "" because I also
thought that "" was technically a string, but had the same problem when
switching to 0.

I don't want to change the argument type to any, which would probably work.
String would work too. Specifying the datatype has it's advantages -
security.

-Aaron

On 6/23/06, Nolan Erck <[EMAIL PROTECTED]> wrote:
> Without seeing some source code all I can think of is....
>
> 1. you aren't running ColdFusion 6.0 are you?
>
> 2. "This happens even when the argument is optional, and I have 
> default values of 0 or ""
>
> ...well technically "" is not a numeric value, so maybe that's part of 
> the issue?
>
> Do you get any better results if you change the argument type to 
> "any"?
>
> hth
>
> -nolan
>
> Nolan Erck
> Web Developer/Programmer
> Schools Financial Credit Union
> (916) 569-5409 Office
> (916) 569-2024 Fax
> www.schools.org
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of Aaron Roberson
> Sent: Friday, June 23, 2006 10:59 AM
> To: cfcdev@cfczone.org
> Subject: [CFCDev] Need Help with Arguments in CFCs
>
> It seems that every time I create a cfc with arguments other than 
> string that I get a message like "The argument xxxx passed to function 
> xxxx is not of type xxxx."
>
> This happens even when the argument is optional, and I have default 
> values of 0 or "". Right now it is happening when I don't pass an 
> argument to my cfc even though the argument is optional and the 
> default value is 0 (it's numeric).
>
> Any suggestions?
>
> Thanks,
> Aaron
>
> P.S. I did a search first, so if this is something that comes up often 
> and has been answered elsewhere, please forgive me - I tried.
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to 
> cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject 
> of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
> (www.cfxhosting.com).
>
> An archive of the CFCDev list is available at 
> www.mail-archive.com/cfcdev@cfczone.org
>
>
>
>
> The information contained in this e-mail is confidential and may 
> contain privileged information exempt from disclosure under applicable 
> law. The information is intended only for the use of the individual or 
> entity to which it is addressed. If you are not the intended 
> recipient, employee, or agent responsible to deliver it to the 
> intended recipient, you are hereby notified that any use, 
> dissemination, distribution, or copying of this communication is 
> strictly prohibited. If you have received this e-mail in error, please 
> delete the message from your computer and immediately notify the 
> sender by telephone (you may call collect) at 916-569-5400 or by 
> e-mail to [EMAIL PROTECTED] Thank you.
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to 
> cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject 
> of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
> (www.cfxhosting.com).
>
> An archive of the CFCDev list is available at 
> www.mail-archive.com/cfcdev@cfczone.org
>
>
>


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/cfcdev@cfczone.org





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org


Reply via email to