mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
8154405: AccessControlException by URLPermission check
Reviewed-by: serb, ssadetsky, mullan
This commit is contained in:
parent
25e03a8e65
commit
108cfd6c19
1 changed files with 14 additions and 10 deletions
|
@ -673,11 +673,13 @@ public abstract class Toolkit {
|
|||
* <p>
|
||||
* This method first checks if there is a security manager installed.
|
||||
* If so, the method calls the security manager's
|
||||
* {@code checkPermission} method with the
|
||||
* url.openConnection().getPermission() permission to ensure
|
||||
* that the access to the image is allowed. For compatibility
|
||||
* with pre-1.2 security managers, if the access is denied with
|
||||
* {@code FilePermission} or {@code SocketPermission},
|
||||
* {@code checkPermission} method with the corresponding
|
||||
* permission to ensure that the access to the image is allowed.
|
||||
* If the connection to the specified URL requires
|
||||
* either {@code URLPermission} or {@code SocketPermission},
|
||||
* then {@code URLPermission} is used for security checks.
|
||||
* For compatibility with pre-1.2 security managers, if the access
|
||||
* is denied with {@code FilePermission} or {@code SocketPermission},
|
||||
* the method throws the {@code SecurityException}
|
||||
* if the corresponding 1.1-style SecurityManager.checkXXX method
|
||||
* also denies permission.
|
||||
|
@ -717,11 +719,13 @@ public abstract class Toolkit {
|
|||
* <p>
|
||||
* This method first checks if there is a security manager installed.
|
||||
* If so, the method calls the security manager's
|
||||
* {@code checkPermission} method with the
|
||||
* url.openConnection().getPermission() permission to ensure
|
||||
* that the image creation is allowed. For compatibility
|
||||
* with pre-1.2 security managers, if the access is denied with
|
||||
* {@code FilePermission} or {@code SocketPermission},
|
||||
* {@code checkPermission} method with the corresponding
|
||||
* permission to ensure that the image creation is allowed.
|
||||
* If the connection to the specified URL requires
|
||||
* either {@code URLPermission} or {@code SocketPermission},
|
||||
* then {@code URLPermission} is used for security checks.
|
||||
* For compatibility with pre-1.2 security managers, if the access
|
||||
* is denied with {@code FilePermission} or {@code SocketPermission},
|
||||
* the method throws {@code SecurityException}
|
||||
* if the corresponding 1.1-style SecurityManager.checkXXX method
|
||||
* also denies permission.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue