[
https://issues.apache.org/jira/browse/JSPWIKI-877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132784#comment-18132784
]
Arturo Bernal commented on JSPWIKI-877:
---------------------------------------
Pull request 545 fixes the policy file: Engine.findConfigFile now returns the
file when the name is the absolute path of an existing file, and a test in
AuthorizationManagerTest covers it. Before, jspwiki.policy.file with an
absolute path was never found and the wiki failed to start with the message
Could not initialize local security policy.
I read the code of the other settings that this issue mentions. The XML user
database and the XML group database (jspwiki.xmlUserDatabaseFile and
jspwiki.xmlGroupDatabaseFile) open the value with new File, so an absolute path
works there, and so does the custom properties file (jspwiki.custom.config) in
PropertyReader. For jspwiki.filterConfig, DefaultFilterManager asks the servlet
context first, then the class path, and only then falls back to a plain file
path. That fallback should cover an absolute path on Linux, as the description
says. I have not tested the case that the description reports for Windows,
where the first lookup is said to fail with a SEVERE error before the fallback
is reached, so I cannot say if filterConfig is solved on Windows. JSPWIKI-878
is about environment variables and is closed, so it does not conflict with this
change.
> Allow jspwiki.properties filterConfig and policy.file to have fully qualified
> paths
> -----------------------------------------------------------------------------------
>
> Key: JSPWIKI-877
> URL: https://issues.apache.org/jira/browse/JSPWIKI-877
> Project: JSPWiki
> Issue Type: Bug
> Components: Core & storage
> Affects Versions: 2.10.1
> Reporter: David Vittor
> Assignee: David Vittor
> Priority: Major
> Labels: pull-request-available
> Attachments: JSPWIKI-877.patch
>
>
> Currently adding the following properties does not work:
> * jspwiki.policy.file=C:/temp/jspwiki-custom.policy
> * jspwiki.filterConfig=C:/temp/jspwiki-filters.xml
> The policy file only checks certain locations, and not fully qualified paths.
> The filterConfig has the same problem, but does work in linux, but not in
> windows as this expects a URL, e.g. file:/C:/temp/... but this causes a
> SEVERE filterStart error in tomcat.
> Note: These seem to be inconsistant with UserDatabase and GroupDatabase
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)