Closed BalusC closed 8 months ago
I also noticed that these pieces of logic in CompositionHandler
and IncludeHandler
do not take into account that the path
can be a relative path and incorrectly assume them always to be the absolute path.
if (path.startsWith(webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory))) {
throw new TagAttributeException(tag, src, "Invalid src, contract resources cannot be accessed this way : " + path);
}
Discovered while working on https://github.com/eclipse-ee4j/mojarra/pull/5328
Spec says it may not start with
/
When set as such in web.xml
Impl throws exception because it does not start with
/
This was earlier discovered and pointed out in https://github.com/eclipse-ee4j/mojarra/issues/5118
But in hindsight not fully fixed because the code is not DRY wrt obtaining contracts param. The same code was copypasted in several other classes.