Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive unused var when local variable is used in queryparam #416

Closed
justinmclean opened this issue Aug 10, 2017 · 3 comments
Closed
Labels
Milestone

Comments

@justinmclean
Copy link
Contributor

local varied variables used in query params inside a cfquery tag are incorrectly marked as unused.

@justinmclean justinmclean changed the title False possible unused var when local variable is used in query-adam False possible unused var when local variable is used in queryparam Aug 10, 2017
@justinmclean justinmclean changed the title False possible unused var when local variable is used in queryparam False positive unused var when local variable is used in queryparam Aug 10, 2017
@justinmclean
Copy link
Contributor Author

justinmclean commented Aug 10, 2017

Example code (not real obviously)

<cfcomponent>
<cffunction name="changePassword">
<cfscript>
var salt = createUUID();
var hash = hash(password & salt);
var update = "";
</cfscript>
<cfquery name="update">
update logins
set hash = <cfqueryparam value="#hash#" cfsqltype="CF_SQL_VARCHAR">
</cfquery>
</cffunction>
</cfcomponent>

@TheRealAgentK
Copy link
Collaborator

Quick note: @ryaneberly and I set the testcase to @ignore today so that we could deploy 1.2.3

@TheRealAgentK TheRealAgentK modified the milestone: 1.3.0 Aug 12, 2017
ryaneberly added a commit that referenced this issue Aug 12, 2017
@ryaneberly
Copy link
Contributor

fixed and the test reenabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants