Skip to content

Commit

Permalink
Make the custom war URL handler available when processing the security
Browse files Browse the repository at this point in the history
manager's policy file.
Part of the fix for BZ 60087

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1763319 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Oct 4, 2016
1 parent f0aace6 commit 0481f86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/catalina.bat
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ set JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
:gotJsseOpts
set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"

rem Register custom URL handlers
rem Do this here so they can be used in the security policy
set "JAVA_OPTS=%JAVA_OPTS% -Djava.protocol.handler.pkgs=org.apache.catalina.webresources"

if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
set LOGGING_CONFIG=-Dnop
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
Expand Down
4 changes: 4 additions & 0 deletions bin/catalina.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ if [ -z "$JSSE_OPTS" ] ; then
fi
JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS"

# Register custom URL handlers
# Do this here so they can be used in the security policy
JAVA_OPTS="%JAVA_OPTS% -Djava.protocol.handler.pkgs=org.apache.catalina.webresources"

# Set juli LogManager config file if it is present and an override has not been issued
if [ -z "$LOGGING_CONFIG" ]; then
if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
Expand Down
1 change: 1 addition & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@
<include name="org/apache/catalina/startup/ClassLoaderFactory$*.*" />
<include name="org/apache/catalina/startup/Tool.*" />
<include name="org/apache/catalina/security/SecurityClassLoad.*" />
<include name="org/apache/catalina/webresources/war/**" />
</patternset>

<patternset id="files.tomcat-juli">
Expand Down

0 comments on commit 0481f86

Please sign in to comment.