RFR: 8277457: AccessControlException: access denied ("java.net.NetPermission" "getCookieHandler")
Kevin Rushforth
kcr at openjdk.java.net
Wed Nov 24 23:21:25 UTC 2021
As indicated in the bug report, WebView needs to call to `CookieManager::getDefault` within a `doPrivileged` block so that it will work when a security manager is enabled. There are two calls in `com.sun.webkit.network.CookieJar` that are not wrapped in a `doPrivileged`.
I added a manual test (since it requires loading a page over http/https which we can't do in our automated tests) based on the test program that was attached to JBS.
-------------
Commit messages:
- 8277457: AccessControlException: access denied ("java.net.NetPermission" "getCookieHandler")
Changes: https://git.openjdk.java.net/jfx/pull/681/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=681&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8277457
Stats: 101 lines in 2 files changed: 99 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jfx/pull/681.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/681/head:pull/681
PR: https://git.openjdk.java.net/jfx/pull/681
More information about the openjfx-dev
mailing list