After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742557 - Prevent the accidental escaping of globals with Lua plugins
Prevent the accidental escaping of globals with Lua plugins
Status: RESOLVED FIXED
Product: libpeas
Classification: Platform
Component: lua
git master
Other Linux
: Normal major
: ---
Assigned To: libpeas-maint
libpeas-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-07 21:34 UTC by Garrett Regier
Modified: 2015-02-14 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Prevent the accidental escaping of globals with Lua plugins (13.35 KB, patch)
2015-01-23 02:56 UTC, Garrett Regier
committed Details | Review

Description Garrett Regier 2015-01-07 21:34:14 UTC
It is very easy to create globals by accident in Lua, we should implement strict mode. This must be done before a new stable version is released.

Example: http://metalua.luaforge.net/src/lib/strict.lua.html
Comment 1 Garrett Regier 2015-01-23 02:56:42 UTC
Created attachment 295252 [details] [review]
Prevent the accidental escaping of globals with Lua plugins

This implements a strict mode which prevents the creation of globals, except when using rawset(). This can be disabled for incompatible code by setting __STRICT to false.
Comment 2 Garrett Regier 2015-02-14 20:33:19 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.