mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-28 05:50:26 +08:00
CB-7940 Disable exec bridge if bridgeSecret is wrong
This commit is contained in:
parent
fc63f66e89
commit
032ea8a8d3
@ -99,6 +99,8 @@ public class CordovaBridge {
|
|||||||
}
|
}
|
||||||
// Bridge secret wrong and bridge not due to it being from the previous page.
|
// Bridge secret wrong and bridge not due to it being from the previous page.
|
||||||
if (expectedBridgeSecret < 0 || bridgeSecret != expectedBridgeSecret) {
|
if (expectedBridgeSecret < 0 || bridgeSecret != expectedBridgeSecret) {
|
||||||
|
Log.e(LOG_TAG, "Bridge access attempt with wrong secret token, possibly from malicious code. Disabling exec() bridge!");
|
||||||
|
clearBridgeSecret();
|
||||||
throw new IllegalAccessException();
|
throw new IllegalAccessException();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user