mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05:00
stand: lua: module names should permit more
The module entries should generally allow whatever is allowed as an env_var in the pattern table. Notably, we're missing periods which would allow proper entries for .dtb files in loader.conf that don't need to specify a module_name entry for it. %d in this expression is actually redundant as %w is actually "all alphanumerics," but I've included it for now to match the env_var entry. We should really remove it from both. Reported by: "aribi" on the forums via allanjude@ (cherry picked from commit 5bc1e0c2285e73fe8455bb6c72b2b40e33f5477e)
This commit is contained in:
parent
2f269a3532
commit
6b2f0a3c31
1 changed files with 4 additions and 1 deletions
|
|
@ -61,7 +61,10 @@ local MSG_FAILSYN_EOLESC = "Stray escape at end of line"
|
|||
local MSG_FAILSYN_EOLVAR = "Unescaped $ at end of line"
|
||||
local MSG_FAILSYN_BADVAR = "Malformed variable expression at position '%d'"
|
||||
|
||||
local MODULEEXPR = '([-%w_]+)'
|
||||
-- MODULEEXPR should more or less allow the exact same set of characters as the
|
||||
-- env_var entries in the pattern table. This is perhaps a good target for a
|
||||
-- little refactoring.
|
||||
local MODULEEXPR = '([%w%d-_.]+)'
|
||||
local QVALEXPR = '"(.*)"'
|
||||
local QVALREPL = QVALEXPR:gsub('%%', '%%%%')
|
||||
local WORDEXPR = "([-%w%d][-%w%d_.]*)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue