DO NOT REPLY [Bug 45569] New: Eliminate need for user.dir grant when not using relative-catalogs

[email protected]
Newsgroups gmane.text.xml.commons.devel
Message-ID <[email protected]/bugzilla/>
https://issues.apache.org/bugzilla/show_bug.cgi?id=45569

           Summary: Eliminate need for user.dir grant when not using
                    relative-catalogs
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Resolver
        AssignedTo: [email protected]
        ReportedBy: [email protected]


When the CatalogManager configuration of relative-catalogs is false, the
catalog paths will be absolute.  When parsing the catalogs in
Catalog.parseCatalogFile, the first thing that occurs is creating a URL of the
current working directory, which requires a grant to the "user.dir"
PropertyPermission.  Creating this URL is unnecessary when an absolute path to
the catalog is passed in and the grant would also be unnecessary.

To alleviate this condition, a URL can be attempted to be made from the
fileName first and if a MalformedURLException occurs, treat it as a relative
path.  In essence:

try {
  base = new URL(fixSlashes(fileName));
} catch (MalformedURLException mue) {
 ...
}

Alternatively, there can be a mode set or passed in to treat the fileName
appropriately.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.