pub enum FileAccess {
Allowed,
Denied,
}Expand description
Whether EJS tags that read the local filesystem are honoured.
--configfile documents are authored by someone who already has filesystem access, so
<% include %> / <%- stringify %> are resolved verbatim — the same rationale that makes
rift-mock-core’s ScriptBaseDir::ConfigRelative unrestricted. A document fetched over the network (U-12’s
https: source) has no such author, so those two tags are refused rather than resolved:
honouring them would let whoever serves the document read arbitrary local files. <%= process.env.X %> still substitutes in both — env is deployment config the operator chose to
expose to their own process.
Variants§
Allowed
Local document: include and stringify resolve against the document’s directory.
Denied
Remote document: include and stringify are a load error naming the tag.