Skip to content

Scenario where cfqueryparam check isn't flagging variables #18

@jbartlett777

Description

@jbartlett777

Fixinator 5.0.1 has found and fixed MANY issues in a legacy app but I had a script where it caught the last variable in the query but not the first two. I removed code until I was left with the following and still able to reproduce

<CFSET cSet="">
<CFSET cVal="">
<cfquery name="qryUpdate" datasource="#db_source#" >
	pr_CO_UpdateSettings '#cSet#', '#cVal#', '#session.ML_USER_ATTUID#'
</cfquery>

If I remove either or both of the CFSET commands, it catches the variables correctly.

While testing the above code and trying different variations, I noticed it wouldn't catch single-character variables

<cfquery name="qryUpdate" datasource="#db_source#">
	pr_CO_UpdateSettings '#a#', '#b#', '#c#', #d#, #e#
</cfquery>

The code above was scanned in an isolated directory in case that has any impact, such as if there's variable scanning logic elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions