#Accessing global tables yields 'fake' empty tables?

11 messages · Page 1 of 1 (latest)

fallen nacelle
#

Was a core change made to WeakAuras recently where we can't access global tables? One WeakAura I've had for awhile has recently become broken.

The line in question is the following:

-- Make sure ItemRack has this gear set
if ItemRackUser.Sets[swapSet] == nil then

37: attempt to index field 'Sets' (a nil value)

(see image) Calling /run print(ItemRackUser) in my chat frame yields a different table than print(G_.ItemRackUser) from inside of my WeakAura's Init. When printing out the keys of ItemRackUser inside WeakAuras, there are no keys/values, meaning WeakAuras is handing me a 'fake' table. I've ran into this issue before when trying to access tables/functions on WeakAuras' forbidden list.

The complete code for the WeakAura is [here] though is likely not relevant to this issue.

#

e.g. the result of /run for k, v in pairs(ItemRackUser.Sets) do print(k, v) end

However doing this inside of the WeakAura yields an empty iterator on a table that doesn't match the address of ItemRackUser, EVEN IF I call the table via _G.ItemRackUser

unique thistle
#

for.. security reasons, won't go in details

fallen nacelle
unique thistle
#

workaround is to reimplement them without using weakauras

fallen nacelle
unique thistle
#

i'm not going to help bypass a restriction we added to protect users

#

wouldn't have happen if people were not using weakauras as a mean to harm :[

fallen nacelle
# unique thistle i'm not going to help bypass a restriction we added to protect users

I'll mark as solved, but a few things:

  • Was this mentioned in the changelog? I scrolled through it for a few pages and couldn't find any mention of it.
  • Not mentioning the security reason doesn't really instill faith on part of the user that the sacrifice was worth it, leading to frustration.
  • As a developer myself, this would be better solved by contacting ItemRack and allowing support of an API table, such that the abuse can be controlled/mitigated
  • Rather than removing access to the entire table, allow read only access to the table. For example, setmetatable({ }, { __index = ItemRackUser }) would prevent reassignment.
unique thistle