Avoid error logs for invalid jcr paths in AggregatorFilter 
-----------------------------------------------------------

                 Key: MAGNOLIA-3199
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3199
             Project: Magnolia
          Issue Type: Bug
    Affects Versions: 4.3.1
            Reporter: Fabrizio Giustina
            Assignee: Fabrizio Giustina
            Priority: Minor
             Fix For: 4.3.x


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:
- an invalid char like '*', ':' (e.g. http://mysite/test*a:b.html )
- a trailing slash (e.g. http://mysite/test /a.html )
- an single / (e.g. http://mysite// )

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.







-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to