prosody: Call tostring on the key being used for nil global read before concatenating it with a string.

Thu, 10 Dec 2009 02:50:23 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 10 Dec 2009 02:50:23 +0500
changeset 2827
b9df83793d84
parent 2826
d8e83625ad58
child 2828
fbddc3ed0d09

prosody: Call tostring on the key being used for nil global read before concatenating it with a string.

prosody file | annotate | diff | comparison | revisions
--- a/prosody	Thu Dec 10 02:47:13 2009 +0500
+++ b/prosody	Thu Dec 10 02:50:23 2009 +0500
@@ -286,7 +286,7 @@
 function init_global_protection()
 	-- Catch global accesses
 	local locked_globals_mt = {
-		__index = function (t, k) log("warn", "%s", debug.traceback("Attempt to read a non-existent global '"..k.."'", 2)); end;
+		__index = function (t, k) log("warn", "%s", debug.traceback("Attempt to read a non-existent global '"..tostring(k).."'", 2)); end;
 		__newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end;
 	};
 		

mercurial