summaryrefslogtreecommitdiff
path: root/startop/scripts/app_startup/lib/args_utils.py
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2019-07-16 16:50:42 -0600
committerBryan Ferris <bferris@google.com>2019-09-10 21:16:10 +0000
commit0e66ea6f3221aa8ccbb78ce38fbcaa67d8ea94f9 (patch)
treed11fe2af77cd87fc40f4e3b98f92439750db7e84 /startop/scripts/app_startup/lib/args_utils.py
parent13f49c42599dc2ea0be376be34275aefcb70d398 (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
Diffstat (limited to 'startop/scripts/app_startup/lib/args_utils.py')
0 files changed, 0 insertions, 0 deletions