View Single Post
07-14-16, 05:17 PM   #8
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Lombra View Post
AcceptTrade doesn't require a hardware event? That is terrible. Or are they being tricked into executing that somehow?

Yes, they are being tricked into executing that by catching any hardware events with a secure frame
I don't know how exactly they do that, but I could only manage catching any left-clicks

Originally Posted by Kanegasi View Post
What about something like saving AcceptTrade() into a local object, wiping the main one to nil, then setting TradeFrameTradeButton's onclick script to call the local object. That way, a trade is accepted only if the Trade UI's confirm button is clicked.

Good idea. Or maybe without wiping the global one to nil, to not break any other Trade UI related addons.
Lua Code:
  1. local oldAcceptTrade = AcceptTrade
  2.  
  3. function AcceptTrade()
  4.     if RunScript ~= RemoveExtraSpaces then
  5.         oldAcceptTrade()
  6.     end
  7. end
  8.  
  9. TradeFrameTradeButton:SetScript("OnClick", AcceptTrade)

It might be really obvious, but why is RemoveExtraSpaces not a local scope function It's only being used in ChatFrame.lua

@Resike: So there is no way to stop an addon message before it already has done the damage?


Edit: It looks like Blizzard is already checking for any suspicious whisper messages?



It's not possible to say "loadstring" anymore in chat channels, including whisper

But they could still whisper something like
Lua Code:
  1. pcall(_G["load".."string"](msg))

Last edited by Ketho : 07-15-16 at 07:43 PM.
  Reply With Quote