Skip to content

Commit

Permalink
COLDBOX-1278 #resolve
Browse files Browse the repository at this point in the history
Remove unsafe evaluate function usage
  • Loading branch information
lmajano committed Apr 22, 2024
1 parent 42e7706 commit 715224a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion system/core/dynamic/MixerUtil.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,16 @@ component {
* Removes a method in a CFC
*/
function removePropertyMixin( required propertyName, scope = "variables" ){
structDelete( evaluate( arguments.scope ), arguments.propertyName );
switch( arguments.scope ){
case "variables":
return structDelete( variables, arguments.propertyName );
break;
case "this":
structDelete( this, arguments.propertyName );
break;
default:
throw( "Invalid scope" );
}
return this;
}

Expand Down

0 comments on commit 715224a

Please sign in to comment.