Angry Keystones

Angry Keystones

20M Downloads

ADDON_ACTION_BLOCKED and taint fix

fgmenth opened this issue ยท 1 comments

commented

For those receiving "[ADDON_ACTION_BLOCKED] AddOn 'AngryKeystones' tried to call the protected function 'CompactRaidFrame1:Show()" after many months of having this error pop up on BugGrabber I found what's causing it. Apparently this is a taint issue that's happening with this addon's settings page and more specifically when it initializes the dropdown menu. For whatever reason Blizzard's code is kinda borked, so when you initialize a dropdown menu in a non secure call then it will taint it along with any frame that propagates from it, including the CompactRaidFrame and the CompactPartyFrame.

Looking at config.lua there is a function called Config:InitializeDropdown() and in there we can see that it sets some variables to either use a secure DropDown library (provided you already have it) or Blizzard's own unsecure implementation. So if you don't have this exact library, this addon defaults to initializing the menus unsecurely leading to taints.

This was a hard bug to track down cause it only happens when the addon is initialized before Blizzard's UI code. So sometimes when you first log in everything will work fine, but after you /reload or walk through a portal it will taint your frames. It was really frustrating, because it's also affected when other addons slow down your load times making the taint issue more probable.

In my opinion a permanent fix would be to implement a library like LibUIDropDownMenu (or another one similar to that) or make the entire initialize function a secure call.

Temporarily I commented out all the dropdown inits inside Config:InitializeDropdown and it appears to have fixed the problem. I don't have the options, but I don't have errors or tainted frames either.

commented

Fixed in v23