Skip to content

Commit 715224a

Browse files
committed
COLDBOX-1278 #resolve
Remove unsafe evaluate function usage
1 parent 42e7706 commit 715224a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

system/core/dynamic/MixerUtil.cfc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,16 @@ component {
161161
* Removes a method in a CFC
162162
*/
163163
function removePropertyMixin( required propertyName, scope = "variables" ){
164-
structDelete( evaluate( arguments.scope ), arguments.propertyName );
164+
switch( arguments.scope ){
165+
case "variables":
166+
return structDelete( variables, arguments.propertyName );
167+
break;
168+
case "this":
169+
structDelete( this, arguments.propertyName );
170+
break;
171+
default:
172+
throw( "Invalid scope" );
173+
}
165174
return this;
166175
}
167176

0 commit comments

Comments
 (0)