[MAGNOLIA-3199] Avoid error logs for invalid jcr paths in AggregatorFilter Created: 11/May/10 Updated: 23/Jan/13 Resolved: 11/Dec/11 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.3.1 |
| Fix Version/s: | 4.3.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Fabrizio Giustina | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Description |
|
Since we now allow extended chars for any url, Aggregator filter may now check the esistence in the jcr repository of a path containing invalid chars. Although this doesn't cause any problem to the user (an invalid path is translated to a 404, which is the expected result), this may generate some annoying logs. Requesting a URL with:
generates a MalformedPath/IllegalName exception wrapped into a RepositoryException and logged (with error level). Since there is no specific exception thrown we can't add an appropriate silent catch, so we should avoid calling isExist() for invalid handles. Unfortunately it seems there is nothing available for validating a path in Jcr... Jackrabbit has something similar but only in version 2.0 and using jackrabbit-specific APIs, so it's not an option. The only simple solution is to explicitly check for common chars/rules like the ones before in the Aggregator filter. |
| Comments |
| Comment by Fabrizio Giustina [ 13/May/10 ] |
|
Partially resolved for version 4.3.2, I am leaving the issue open for feedback and for additional checks. At the moment I simply added a isJcrPathValid in AggregatorFilter, which manually check for some of the common conditions. I think it's appropriate to have this check only here (it's not something should be verified on "normal" jcr operations but only here where the whole content of the URL is given as an argument to hierarchyManager.isExist(). The number of checks should be increased, I'll try to implement some kind of unit test in order to catch as much conditions as possible. |
| Comment by Fabrizio Giustina [ 11/Dec/11 ] |
|
closing, patch in 4.3.2 is ok |