Skip to content

Commit

Permalink
fix(QueryUtils): Handle numeric checks with Secure Profile enabled
Browse files Browse the repository at this point in the history
The default ACF Secure Profile disables access to internal Java classes.  While we disagree with the practice, this change allows developers running qb in those environments to not run in to SecurityExceptions.
  • Loading branch information
satauros authored Jul 7, 2020
1 parent 8994cd8 commit a849525
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions models/Query/QueryUtils.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,18 @@ component displayname="QueryUtils" accessors="true" {
}

private boolean function checkIsActuallyNumeric( required any value ) {
return isNull( arguments.value ) ||
arrayContainsNoCase(
[
"CFDouble",
"Integer",
"Double",
"Float",
"Long",
"Short"
],
value.getClass().getSimpleName()
return isNull( arguments.value ) || (
isSimpleValue( arguments.value ) && arrayContainsNoCase(
[
"CFDouble",
"Integer",
"Double",
"Float",
"Long",
"Short"
],
listLast( getMetadata( arguments.value ), ". " )
)
);
}

Expand Down

0 comments on commit a849525

Please sign in to comment.