API issecurevariable

From Wowpedia
Jump to: navigation, search

Determines whether the given table key is secure.

isSecure, taint = issecurevariable([table,] "variable")


Table - table to check the the key in; if omitted, defaults to the globals table (_G).
String - string key to check the taint of. Numbers will be converted to a string; other types will throw an error.


Boolean - true if the table[variable] key is secure, false if it is tainted.
String - name of the addon that tainted the table field; an empty string if tainted by a macro; nil if secure.


  • Returns true, nil for undefined or secure variables.
  • Existing table fields that are set to nil from an insecure execution path are tainted.
  • If table[variable] == nil, and table has a metatable with __index, this function will return whether the metatable's __index[varible] is tainted. You must remove the metatable to check whether table[variable] itself is tainted.
  • Cannot be used to check taint of local variables, or non-string table keys.