[ 
https://issues.apache.org/jira/browse/XMLCOMMONS-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Glavassevich updated XMLCOMMONS-69:
-------------------------------------------

    Fix Version/s: XML Commons Resolver 1.2.0

> Eliminate need for user.dir grant when not using relative-catalogs
> ------------------------------------------------------------------
>
>                 Key: XMLCOMMONS-69
>                 URL: https://issues.apache.org/jira/browse/XMLCOMMONS-69
>             Project: XmlCommons
>          Issue Type: Bug
>          Components: XML Commons Resolver (resolver.jar)
>    Affects Versions: 1.x
>         Environment: Operating System: All
> Platform: PC
>            Reporter: Eddy Chan
>            Assignee: Commons Developers Mailing List
>             Fix For: XML Commons Resolver 1.2.0
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to