From: kkolinko Date: Tue, 5 Jul 2011 07:10:31 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51473 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f8d4f1cd120285b11b4d24654b49d6b1864bc2bc;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51473 Fix concatenation of values in SecurityConfig.setSecurityProperty() when the value provided by JRE is null. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1142904 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/security/SecurityConfig.java b/java/org/apache/catalina/security/SecurityConfig.java index 64488d641..8963fbe5a 100644 --- a/java/org/apache/catalina/security/SecurityConfig.java +++ b/java/org/apache/catalina/security/SecurityConfig.java @@ -39,6 +39,8 @@ public final class SecurityConfig{ + ",org.apache.coyote." + ",org.apache.tomcat."; + // FIX ME package "javax." was removed to prevent HotSpot + // fatal internal errors private static final String PACKAGE_DEFINITION= "java.,sun." + ",org.apache.catalina." + ",org.apache.coyote." @@ -117,13 +119,14 @@ public final class SecurityConfig{ if (System.getSecurityManager() != null){ String definition = Security.getProperty(properties); if( definition != null && definition.length() > 0 ){ - definition += ","; + if (packageList.length() > 0) { + definition = definition + ',' + packageList; + } + } else { + definition = packageList; } - Security.setProperty(properties, - // FIX ME package "javax." was removed to prevent HotSpot - // fatal internal errors - definition + packageList); + Security.setProperty(properties, definition); } } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 1f3349a4d..38c79a777 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -70,6 +70,10 @@ listeners and filters are stopped in a separate thread rather than the current thread. Patch provided by Felix Schumacher. (markt) + + 51473: Fix concatenation of values in + SecurityConfig.setSecurityProperty(). (kkolinko) + @@ -89,7 +93,7 @@ -
+