CB-7940 Disable exec bridge if bridgeSecret is wrong

This commit is contained in:
Andrew Grieve 2014-11-04 15:57:51 -05:00
parent fc63f66e89
commit 032ea8a8d3

View File

@ -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;