mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +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.
|
||||
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();
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user