Skip to content

Commit 0c4ff0c

Browse files
committed
Fix jakartaee#443 Remove references to the SecurityManager and associated APIs
1 parent 89d21f7 commit 0c4ff0c

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

api/src/main/java/jakarta/servlet/ServletContext.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
2+
* Copyright (c) 1997, 2023 Oracle and/or its affiliates and others.
33
* All rights reserved.
44
* Copyright 2004 The Apache Software Foundation
55
*
@@ -1245,8 +1245,6 @@ public interface ServletContext {
12451245
*
12461246
* @return the class loader of the web application represented by this ServletContext
12471247
*
1248-
* @throws SecurityException if a security manager denies access to the requested class loader
1249-
*
12501248
* @since Servlet 3.0
12511249
*/
12521250
public ClassLoader getClassLoader();

api/src/main/java/jakarta/servlet/http/Cookie.java

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021 Oracle and/or its affiliates and others.
2+
* Copyright (c) 1997, 2023 Oracle and/or its affiliates and others.
33
* All rights reserved.
44
* Copyright 2004 The Apache Software Foundation
55
*
@@ -19,8 +19,6 @@
1919
package jakarta.servlet.http;
2020

2121
import java.io.Serializable;
22-
import java.security.AccessController;
23-
import java.security.PrivilegedAction;
2422
import java.text.MessageFormat;
2523
import java.util.Collections;
2624
import java.util.Locale;
@@ -76,12 +74,8 @@ public class Cookie implements Cloneable, Serializable {
7674
private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE);
7775

7876
static {
79-
boolean enforced = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
80-
@Override
81-
public Boolean run() {
82-
return Boolean.valueOf(System.getProperty("org.glassfish.web.rfc2109_cookie_names_enforced", "true"));
83-
}
84-
});
77+
boolean enforced = Boolean.valueOf(System.getProperty("org.glassfish.web.rfc2109_cookie_names_enforced", "true"));
78+
8579
if (enforced) {
8680
TSPECIALS = "/()<>@,;:\\\"[]?={} \t";
8781
} else {

spec/src/main/asciidoc/servlet-spec-body.adoc

+6-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:sectnums!:
66
== Jakarta Servlet Specification, Version {spec-version}
77

8-
Copyright (c) 2022 Contributors to the Eclipse Foundation.
8+
Copyright (c) 2023 Contributors to the Eclipse Foundation.
99

1010
Eclipse is a registered trademark of the Eclipse Foundation. Jakarta
1111
is a trademark of the Eclipse Foundation. Oracle and Java are
@@ -221,12 +221,8 @@ servlet, may modify responses produced by servlets before sending them
221221
to the clients, or may respond to requests without delivering them to
222222
the servlet under the compliance with RFC 7234.
223223

224-
A servlet container may place security
225-
restrictions on the environment in which a servlet executes. These
226-
restrictions may be placed using the permission architecture defined
227-
by the Java platform. For example some application servers may limit the
228-
creation of a `Thread` object to insure that other components of the
229-
container are not negatively impacted.
224+
A servlet container may place security restrictions on the environment in which
225+
a servlet executes.
230226

231227
Java SE 11 is the minimum version of the
232228
underlying Java platform with which servlet containers must be built.
@@ -8569,6 +8565,9 @@ Clarify the behaviour of `getDateHeader()` and `getIntHeader()` when multiple
85698565
headers with the same name are present in the `HttpServletRequest`. The expected
85708566
behaviour is aligned with `getHeader()`.
85718567

8568+
link:https://github.com/eclipse-ee4j/servlet-api/issues/443[Issue 443]::
8569+
Remove references to the SecurityManager and associated APIs.
8570+
85728571
link:https://github.com/eclipse-ee4j/servlet-api/issues/453[Issue 453]::
85738572
Add a security warning and a clarification of canonicalization requirements to
85748573
all `ServletContext` methods that accept a path parameter.

0 commit comments

Comments
 (0)