I'm currently using some table manipulation inside the secure environment, where I gather unit frames by recursively scanning the UIParent and inserting all protected frames with a unit attribute assigned into a restricted table.
This works flawlessly - until I open interface settings. After that, attempting to run the snippet that gathers nodes results in this error:
Lua Code:
1x FrameXML\RestrictedExecution.lua:397: Call failed: FrameXML\RestrictedExecution.lua:397: Call failed: FrameXML\RestrictedExecution.lua:397: Call failed: FrameXML\RestrictedInfrastructure.lua:365: Cannot create restricted tables from insecure code
[C]: ?
FrameXML\RestrictedExecution.lua:397: in function <FrameXML\RestrictedExecution.lua:390>
(tail call): ?
(tail call): ?
FrameXML\SecureHandlers.lua:283: in function <FrameXML\SecureHandlers.lua:277>
(tail call): ?
Locals:
workingEnv = <userdata>
ctrlHandle = <userdata>
pcallFlag = false
LOCAL_Function_Environment_Manager = <function> defined @FrameXML\RestrictedExecution.lua:209
error = <function> defined =[C]:-1
tostring = <function> defined =[C]:-1
Naturally, I turned to the trustworthy taint log to see what the hell happend. After sifting through all the bloat I found this:
Code:
11/25 00:02:09.812 Execution tainted by Bagnon while reading BagnonFrameinventory - Interface\FrameXML\UIParent.lua:2784
11/25 00:02:09.812 securecall()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:2824 CloseWindows()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:2852
11/25 00:02:09.812 securecall()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:3532 ToggleGameMenu()
11/25 00:02:09.812 TOGGLEGAMEMENU:1
11/25 00:02:09.812 Execution tainted by Bagnon while reading BagnonFrameinventory - Interface\FrameXML\UIParent.lua:2784
11/25 00:02:09.812 securecall()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:2824
11/25 00:02:09.812 securecall()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:1966 <unnamed>:ShowUIPanel()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:1880
11/25 00:02:09.812 <unnamed>:SetAttribute()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:2630 ShowUIPanel()
11/25 00:02:09.812 Interface\FrameXML\UIParent.lua:3543 ToggleGameMenu()
11/25 00:02:09.812 TOGGLEGAMEMENU:1
By disabling Bagnon, the errors disappear and I can continue to securely manipulate tables after opening the interface settings. So far, I've had no taint issues with Bagnon, but attempting to manipulate tables after viewing the interface settings seems to cause a complete meltdown.
So what I'm really asking here is:
- Can I prevent this from happening or is the problem only related to Bagnon?
- Can I determine whether I'm running a tainted execution path and thereby circumvent the lockdown?
Here's the actual code, but it's all executed within a secure enviroment and using secure buttons to trigger changes within.
It works regardless of combat state and hasn't broken down in any other scenario thus far.