You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by bu...@apache.org on 2008/08/06 00:02:55 UTC

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

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: commons-dev@xml.apache.org
        ReportedBy: ecapachedev@gmail.com


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.