Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 450b55bb authored by Robert Sesek's avatar Robert Sesek
Browse files

Do not allow WebView instantiation from privileged processes.

Test: Patched in CL on bug, got UnsupportedOperationException
Bug: 36077109
Change-Id: I01dba02407dd7b1ea1ce22f0023f8882e1e96dae
parent 07303288
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -198,7 +198,9 @@ public final class WebViewFactory {
            if (sProviderInstance != null) return sProviderInstance;

            final int uid = android.os.Process.myUid();
            if (uid == android.os.Process.ROOT_UID || uid == android.os.Process.SYSTEM_UID) {
            if (uid == android.os.Process.ROOT_UID || uid == android.os.Process.SYSTEM_UID
                    || uid == android.os.Process.PHONE_UID || uid == android.os.Process.NFC_UID
                    || uid == android.os.Process.BLUETOOTH_UID) {
                throw new UnsupportedOperationException(
                        "For security reasons, WebView is not allowed in privileged processes");
            }