summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2019-07-16 16:50:42 -0600
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-09-20 02:56:39 +0000
commit36a5c576f0d379b0be3716fe5b8b9ae8bb3952f5 (patch)
tree28559b9e2239165135dc9c66d7ef748f91a3c646 /tools/aapt2/java/JavaClassGenerator.cpp
parent07d6f1fe094b6dbde854fb82ada06e85d7a97ecd (diff)
RESTRICT AUTOMERGE Strict SQLiteQueryBuilder needs to be stricter.
Malicious callers can leak side-channel information by using subqueries in any untrusted inputs where SQLite allows "expr" values. This change offers setStrictGrammar() to prevent this by outright blocking subqueries in WHERE and HAVING clauses, and by requiring that GROUP BY and ORDER BY clauses be composed only of valid columns. This change also offers setStrictColumns() to require that all untrusted column names are valid, such as those in ContentValues. Relaxes to always allow aggregation operators on returned columns, since untrusted callers can always calculate these manually. Bug: 135270103, 135269143 Test: atest android.database.sqlite.cts.SQLiteQueryBuilderTest Test: atest FrameworksCoreTests:android.database.sqlite.SQLiteTokenizerTest Change-Id: I0dacb53170ce573a2fe103cbff455782bfdb5d41 (cherry picked from commit 0e66ea6f3221aa8ccbb78ce38fbcaa67d8ea94f9)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions