summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2018-07-25 14:01:59 -0600
committerJeff Sharkey <jsharkey@google.com>2018-12-01 17:23:04 -0700
commitb17c8e73cb01e9630839e2c76d843d15ef567e3c (patch)
tree01d0830ac56fed4293dc24f749f5e1694f70d1f8 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent6c90f1ded24e335c717b1139a8af6c5d8c2f130c (diff)
Execute "strict" queries with extra parentheses.
SQLiteQueryBuilder has a setStrict() mode which can be used to detect SQL attacks from untrusted sources, which it does by running each query twice: once with an extra set of parentheses, and if that succeeds, it runs the original query verbatim. This sadly doesn't catch inputs of the type "1=1) OR (1=1", which creates valid statements for both tests above, but the final executed query ends up leaking data due to SQLite operator precedence. Instead, we need to continue compiling both variants, but we need to execute the query with the additional parentheses to ensure data won't be leaked. Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java Bug: 111085900 Merged-In: I6e8746fa48f9de13adae37d2990de11c9c585381 Change-Id: I6e8746fa48f9de13adae37d2990de11c9c585381
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions