mirror of
https://github.com/nmap/nmap.git
synced 2025-12-26 01:19:03 +00:00
Patch to libraries that were inappropriately using globals.
Often two (or more) scripts using the same library would overwrite the globals each was using. This would result in (at best) an error or (at worst) a deadlock. The patch changes the global accesses to local.
This commit is contained in:
@@ -213,6 +213,7 @@ end
|
||||
-- @return The corresponding absolute URL.
|
||||
-----------------------------------------------------------------------------
|
||||
function absolute(base_url, relative_url)
|
||||
local base_parsed;
|
||||
if type(base_url) == "table" then
|
||||
base_parsed = base_url
|
||||
base_url = build(base_parsed)
|
||||
@@ -313,7 +314,7 @@ function parse_query(query)
|
||||
query = string.gsub(query, "<", "<")
|
||||
query = string.gsub(query, ">", ">")
|
||||
|
||||
function ginsert(qstr)
|
||||
local function ginsert(qstr)
|
||||
local first, last = string.find(qstr, "=")
|
||||
if first then
|
||||
parsed[string.sub(qstr, 0, first-1)] = string.sub(qstr, first+1)
|
||||
|
||||
Reference in New Issue
Block a user