Skip to Main Content
Hack Proofing Your Web Applications
book

Hack Proofing Your Web Applications

by Syngress
June 2001
Intermediate to advanced content levelIntermediate to advanced
512 pages
18h 49m
English
Syngress
Content preview from Hack Proofing Your Web Applications
Securing ColdFusion • Chapter 10 433
<CFABORT showerror="The variable ID has a value other than a
number">
</CFIF>
To combine this with a default value, refer to Figure 10.37.
Figure 10.37 CFIF and Functions Used in Place of a CFPARAM to
Validate Data and Set a Default
<CFIF NOT IsDefined('ID')>
<CFSET ID=0>
<CFELSEIF NOT IsNumeric(ID)>
<CFABORT showerror="The variable ID has a value other than a
number">
</CFIF>
All you have to do here is replace the not defined message with the
setting of the variable.This is five lines of code rather than one, but you
get to control the error messages and maybe do more checking.This
brings us to our final type of checking.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Developer's Guide to Web Application Security

Developer's Guide to Web Application Security

Michael Cross
The CERT® Oracle® Secure Coding Standard for Java™

The CERT® Oracle® Secure Coding Standard for Java™

Fred Long, Dhruv Mohindra, Robert C. Seacord, Dean F. Sutherland, David Svoboda
Troubleshooting CentOS

Troubleshooting CentOS

Jonathan Hobson

Publisher Resources

ISBN: 9781928994312