Verified Commit 49af043c authored by Karel Koci's avatar Karel Koci 🤘

Previous commit dropped support for early uri checks so don't test it

Yes this allows us to pass sub-script a invalid uri but it doesn't
matter if it won't use if and if it will then it will fail on its own.
So just do that check when we need it not always.
parent 63a7ae41
......@@ -489,7 +489,7 @@ function script(result, context, filler, script_uri, extra)
-- Insert the data related to validation, so scripts inside can reuse the info
local merge = {}
for name, check in pairs(script_insert_options) do
for name in pairs(script_insert_options) do
if extra[name] ~= nil then
merge[name] = utils.clone(extra[name])
......@@ -229,10 +229,8 @@ function test_script_pass_validation()
-- Bad uri inside something
bad(", verification = 'sig', pubkey = 'invalid://'", "Unknown URI schema invalid")
-- Even when not used
bad(", pubkey = 'invalid://'", "Unknown URI schema invalid")
-- We don't allow this URI in the given context (even if it is not directly used)
bad(", pubkey = 'file:///dev/null'", "At least Local level required for file URI", "access violation")
bad(", verification = 'sig', pubkey = 'file:///dev/null'", "At least Local level required for file URI", "access violation")
-- But we allow it if there's a high enough level
local result = sandbox.run_sandboxed([[
Script("data:,", { security = 'Restricted', pubkey = 'file:///dev/null' })
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment