Well, it's not necessarily insecure.  However, since the
attributes.join variable is being passed to the database directly, it
needs to be closely sanitized to ensure nothing bad will hapen.  You
can imagine all the potential evil that would be exposed if you just
took the 'join' argument direct from the URL and used it. Really it
all boils down to proper input validation.  If you're doing it
properly, you needn't worry, but if you're not, you could be in big
trouble.  CFQUERYPARAM greatly reduces the requirement, because while
it doesn't ensure the input is valid, it'll at least prevent a variety
of evil things from happening.

cheers,
barneyb

On 6/27/05, Mike Soultanian <[EMAIL PROTECTED]> wrote:
> > <cfparam name="attributes.join" default="left">
> > <cfquery name="getStuff" ...>
> >       select b.*, j.columns
> >       from basetable b
> >       #attributes.join# jointable j on (j.x = b.x)
> > </cfquery>
> >
> > I don't use this syntax because it's insecure... This is simplified to
> 
> Why is this insecure?  Does it have something to do with you using the
> attributes scope?  Sorry if it's a stupid question, but I'm really not
> sure why it is insecure and I figure it's a good thing to know ;)
> 
> Thanks,
> Mike
> 
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210668
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to