Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Using the HEAD revision of the JXR plugin, I find that with certain of my projects determining the relative link between the xref and the jxr.html page can both crash and provide incorrect results. The problem is basically this line:
String relativPath = des.getAbsolutePath().substring( out.getAbsolutePath().length() + 1 );
It does no content checking, and thus when for instance the output directory contains some '..' elements, it doesn't consider how that affects the length. A slight improvement is:
String relativPath = des.getCanonicalPath().substring( out.getCanonicalPath().length() + 1 );
which will at least be better so long as the locations point to similar filesystem locations (see attached patch).
What is really needed is to do a filesystem based compare of the two locations and determine what the link should be - or just add a parameter to let the link be defined as a parameter, and reduce the cases that are guaranteed to work automatically.
Attachments
Attachments
Issue Links
- is superceded by
-
JXR-49 don't generated summary page and include both reports in menu like m1
- Closed