From 105e9365b8231a341ff7f915d0379eef3e2666ee Mon Sep 17 00:00:00 2001 From: batrick Date: Wed, 3 Jun 2009 05:45:19 +0000 Subject: [PATCH] Added note on convention for localizing all globals needed at the beginning of the script. --- nse_main.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nse_main.lua b/nse_main.lua index 44c98db3c..4d81f7292 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -5,6 +5,12 @@ -- The actual arguments passed to the anonymous main function: -- [1] The list of hosts we run against. -- +-- When making changes to this code, please ensure you do not add any +-- code relying global indexing. Instead, create a local below for the +-- global you need access to. This protects the engine from possible +-- replacements made to the global environment, speeds up access, and +-- documents dependencies. +-- -- A few notes about the safety of the engine, that is, the ability for -- a script developer to crash or otherwise stall NSE. The purpose of noting -- these attack vectors is more to show the difficulty in accidently