View Single Post
04-10-20, 06:11 AM   #1
GreenCoyote
A Murloc Raider
 
GreenCoyote's Avatar
Join Date: Apr 2020
Posts: 5
Unhappy Tainted code and Purchase in C_AuctionHouse (patch 8.3)

Hello! Im very new in wow addons, so may be my problem would look silly. Sorry about that.
Im trying to make purchase by addon. But I have a problem. My code is:
Code:
	itemKey = {};
	itemKey.itemID = 14047; -- Runecloth

	sorts = {};
	sorts.sortOrder = 0;
	sorts.reverseSort = false;
	
	C_AuctionHouse.SendSearchQuery(itemKey, sorts, false);
	C_AuctionHouse.StartCommoditiesPurchase(14047, 1);
But wow said this is bad, to call StartCommoditiesPurchase from tainted code.
Well. I read some articles about taint and started to call StartCommoditiesPurchase from secure button. But whole SearchQuersResult was tainted. So I moved all this code to /script of secure button. But according to taint.log, then Im creating table in macro – its taint too: “Global variable itemKey tainted by MACRO_TAINT - itemKey = {}”.

Im sure there is a way to make purchasing by lua code – TSM is doing this. But its code is to sophisticated for my LUA level to understand how it made.
So can someone share simple snippet, or give hint? I tried to google, but there is no good answers.
Sorry for my poor English, and thanks for reading.
  Reply With Quote