Sanitize a Query with Dynamic Table Name
Hi all,
I inherited an application and am stumped on sanitizing a dynamic query that is being flagged on a vulnerability scan.
It starts with a CFINVOKE that passes parameters including tablename, column_names, conditionals.
The function invoked then executes the query something to this effect...
<cfquery name="updateMe" datasource="#myDBsource#">
UPDATE #arguments.tablename#
SET ...
WHERE #arguments.conditionals#
</cfquery>
Usually I would use the <cfqueryparam value="#arguments.tablename#" cfsqltype="CF_SQL_VARCHAR" maxlength="17"> in the conditional, but not sure how to handle when the dynamic part is the actual table name, column name, or conditionals.
Thanks in advance for any help.
