adobe / adobe/aem-project-archetype
Unexpected Behaviour in Dispatcher Publisher Filter
- Dominant language
- JavaScript
- Stars
- 596
- Forks
- 431
- Avg merge
- 10d 6h
- Merged PRs (30d)
- 1
Description
The dispatcher filter rule /0011 { /type "allow" /extension "json" /selectors "model" /path "/content/*" } does not behave as was probably intended. This rule would allow any combination of selectors as long as one of them is 'model'.
For example this filter would accept:
/content/apage.a.b.c.d.model.e.f.json
It would be better to omit this rule as it breaks the fundamental principle of deny then allow, and many developers would not expect to have allowed any selector by using it.
Generally /selectors is not suitable for use in allow rules.
An alternative approach would be to use a regex in the /url switch, which would make a more targeted allow possible.
Contributor guide
Research direction
Locate the archetype's Dispatcher filter configuration and inspect the /0011 rule alongside the surrounding deny-then-allow rules. Verify the behavior with selector combinations like the example, then confirm the configuration no longer permits unintended selector combinations and preserves the intended JSON path handling.
Written by the indexing model from the issue text.
Assessment
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100