Interpret plus signs as spaces in url.parse_query

This commit is contained in:
nnposter 2026-03-16 02:28:27 +00:00
parent 441823173f
commit 84961d5133
2 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,9 @@ o [NSE][GH#2183][GH#3239] Script hostmap-crtsh now reports only true subdomains
necessarily as a suffix). The old behavior can be enabled by setting script necessarily as a suffix). The old behavior can be enabled by setting script
argument hostmap-crtsh.lax. [Sweekar-cmd, nnposter] argument hostmap-crtsh.lax. [Sweekar-cmd, nnposter]
o [NSE] Function url.parse_query was not interpreting plus signs as spaces.
[nnposter]
o [NSE] Function url.parse was not properly parsing URLs with query strings o [NSE] Function url.parse was not properly parsing URLs with query strings
but empty paths. [nnposter] but empty paths. [nnposter]

View file

@ -392,6 +392,7 @@ function parse_query(query)
local pos = 1 local pos = 1
query = string.gsub(query, "&([ampltg]+);", entities) query = string.gsub(query, "&([ampltg]+);", entities)
query = string.gsub(query, "%+", " ")
local function ginsert(qstr) local function ginsert(qstr)
local pos = qstr:find("=", 1, true) local pos = qstr:find("=", 1, true)