You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2017/01/07 14:12:58 UTC
[jira] [Created] (MSHARED-608) Remove index.html-adding block in
AbstractMavenReportRenderer#getValidHref()
Michael Osipov created MSHARED-608:
--------------------------------------
Summary: Remove index.html-adding block in AbstractMavenReportRenderer#getValidHref()
Key: MSHARED-608
URL: https://issues.apache.org/jira/browse/MSHARED-608
Project: Maven Shared Components
Issue Type: Bug
Components: maven-reporting-impl
Affects Versions: maven-reporting-impl 2.4
Reporter: Michael Osipov
Assignee: Michael Osipov
Fix For: maven-reporting-impl 3.0
If URL validation fails, the following is executed:
{code:java}
String hrefTmp;
if ( !href.endsWith( "/" ) )
{
hrefTmp = href + "/index.html";
}
else
{
hrefTmp = href + "index.html";
}
if ( UrlValidationUtil.isValidUrl( hrefTmp ) )
{
return href;
}
{code}
There are several problems here:
* The assumption that {{/}} will point to {{index.html}} is wrong. This is not known. It can ultimately lead to 404. No assumption shall be made to the target.
* There is no way that if a URL is already invalid it will get a valid URL by adding {{index.html}}.
Remove this code block.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)