Thread: Update 5.2
View Single Post
09/27/19, 03:39 PM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,963
I'm not sure what you mean by "This only impacts registering existing secure closures".
I e.g. got the problem on PTS now that my addon FCOItemSaver cannot use a PreHookHandler like OnMouseDoubleClick (called from another prehookhandler "OnEffectivelyShown" of the inventory) on child controls of the inventory anymore as it says it got unsecure 5 steps before.

I'm pretty sure I can solve this by changing my code to use some other preHook (which will takes much work and I'm annoyed to have to do this after some patches again and again, but well...) but WHY is it getting insecure if I do the following?
1. ZO_PreHookHandler(ZO_PlayerInventoryListContents , "OnEffectivelyShown", FCOItemSaver_OnEffectivelyShown)
2. In function "FCOItemSaver_OnEffectivelyShown" for each child control of ZO_PlayerInventoryListContents
ZO_PreHookHandler(childrenCtrl, "OnMouseDoubleClick", FCOItemSaver_InventoryItem_OnMouseDoubleClick)
3. And after 2. in the same function "FCOItemSaver_OnEffectivelyShown" for each child control of ZO_PlayerInventoryListContents
ZO_PreHookHandler(childrenCtrl, "OnMouseUp", FCOItemSaver_InventoryItem_OnMouseUp)

This will throw an insecure error if the step 2 is executed -> As you double click an inventory item!

But it will not throw an error if I do just the following?
1. ZO_PreHookHandler(ZO_PlayerInventoryListContents , "OnEffectivelyShown", FCOItemSaver_OnEffectivelyShown)
2. In the function "FCOItemSaver_OnEffectivelyShown" for each child control of ZO_PlayerInventoryListContents
ZO_PreHookHandler(childrenCtrl, "OnMouseUp", FCOItemSaver_InventoryItem_OnMouseUp)

Why is the PreHookHandler of OnMouseDoubleClick raising an insecure code but OnMouseUp doesn't? Because the function UseItem or whatever is called from the vanilla UI double click is secured?
  Reply With Quote