forked from github/cordova-android
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…
Reference in New Issue
Block a user