Skip to content

Commit

Permalink
Fix #443 Remove references to the SecurityManager and associated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Jan 19, 2023
1 parent ba27532 commit 9eb4311
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
4 changes: 1 addition & 3 deletions api/src/main/java/jakarta/servlet/ServletContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
* Copyright (c) 1997, 2023 Oracle and/or its affiliates and others.
* All rights reserved.
* Copyright 2004 The Apache Software Foundation
*
Expand Down Expand Up @@ -1246,8 +1246,6 @@ public interface ServletContext {
*
* @return the class loader of the web application represented by this ServletContext
*
* @throws SecurityException if a security manager denies access to the requested class loader
*
* @since Servlet 3.0
*/
public ClassLoader getClassLoader();
Expand Down
12 changes: 3 additions & 9 deletions api/src/main/java/jakarta/servlet/http/Cookie.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates and others.
* Copyright (c) 1997, 2023 Oracle and/or its affiliates and others.
* All rights reserved.
* Copyright 2004 The Apache Software Foundation
*
Expand All @@ -19,8 +19,6 @@
package jakarta.servlet.http;

import java.io.Serializable;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.Locale;
Expand Down Expand Up @@ -76,12 +74,8 @@ public class Cookie implements Cloneable, Serializable {
private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE);

static {
boolean enforced = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
return Boolean.valueOf(System.getProperty("org.glassfish.web.rfc2109_cookie_names_enforced", "true"));
}
});
boolean enforced = Boolean.valueOf(System.getProperty("org.glassfish.web.rfc2109_cookie_names_enforced", "true"));

if (enforced) {
TSPECIALS = "/()<>@,;:\\\"[]?={} \t";
} else {
Expand Down
13 changes: 6 additions & 7 deletions spec/src/main/asciidoc/servlet-spec-body.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:sectnums!:
== Jakarta Servlet Specification, Version {spec-version}

Copyright (c) 2022 Contributors to the Eclipse Foundation.
Copyright (c) 2023 Contributors to the Eclipse Foundation.

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

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

Java SE 11 is the minimum version of the
underlying Java platform with which servlet containers must be built.
Expand Down Expand Up @@ -8572,6 +8568,9 @@ behaviour is aligned with `getHeader()`.
link:https://github.com/eclipse-ee4j/servlet-api/issues/415[Issue 415]::
Add overloaded `setCharacterEncoding()` methods that support `Charset`.

link:https://github.com/eclipse-ee4j/servlet-api/issues/443[Issue 443]::
Remove references to the SecurityManager and associated APIs.

link:https://github.com/eclipse-ee4j/servlet-api/issues/453[Issue 453]::
Add a security warning and a clarification of canonicalization requirements to
all `ServletContext` methods that accept a path parameter.
Expand Down

0 comments on commit 9eb4311

Please sign in to comment.