Skip to content

fix: restMappings default reads d.app.restMappings, not d.app.cfengine#347

Open
zspitzer wants to merge 1 commit intoOrtus-Solutions:developmentfrom
zspitzer:restmapping-fix
Open

fix: restMappings default reads d.app.restMappings, not d.app.cfengine#347
zspitzer wants to merge 1 commit intoOrtus-Solutions:developmentfrom
zspitzer:restmapping-fix

Conversation

@zspitzer
Copy link
Copy Markdown

@zspitzer zspitzer commented May 6, 2026

Summary

One-line copy-paste typo at src/cfml/system/services/ServerService.cfc:264:

'restMappings' : d.app.cfengine ?: '',

Reads d.app.cfengine for the restMappings default — should be d.app.restMappings.

Impact

For users who set a global default cfengine via config set server.defaults.app.cfengine=..., the cfengine string (e.g. lucee@7, adobe@2025) cascades into restMappings and gets passed to runwar as a URL pattern. runwar then:

  • Sets servletRestEnable=true (because the value is non-empty)
  • Splits "lucee@7" as a single bogus URL pattern
  • Strips the real /rest/* web.xml mapping (because ignoreWebXmlRestMappings && servletRestEnable)
  • Replaces it with a lucee@7 URL pattern that nothing matches

Result: REST endpoints 404 silently. Affects both Lucee and ACF deployments via CommandBox.

Users without a global default cfengine are unaffected — the fallback is '' either way.

Test plan

  • Set config set server.defaults.app.cfengine=lucee@7, start a server without explicit app.restMappings, confirm REST endpoints work as expected.
  • Without the global default set, behaviour is unchanged.

Copy-paste typo: the default for app.restMappings was being read from
d.app.cfengine, which means a global default cfengine (set via
`config set server.defaults.app.cfengine=...`) cascades into restMappings
and gets passed to runwar as a bogus URL pattern. Result: real /rest/*
web.xml mapping is stripped and replaced with a non-matching pattern,
so REST endpoints 404 silently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant