Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: third_party/sqlite/fts3_85522.patch

Issue 7230021: Fix authorizer issue with fts3 in WebDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace, and add patch file. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/amalgamation/sqlite3.c ('k') | third_party/sqlite/src/ext/fts3/fts3.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Fix http://crbug.com/85522
2
3 WebDatabase uses an authorizer to prevent inappropriate access.
4 fts3.c uses 'PRAGMA page_size' to tune the query optimizer, but PRAGMA
5 is on the disallowed list. This patch adds a default return value for
6 SQLITE_AUTH failures.
7
8 diff --git src/ext/fts3/fts3.c src/ext/fts3/fts3.c
9 index 8498cfa..dfa3891 100644
10 --- src/ext/fts3/fts3.c
11 +++ src/ext/fts3/fts3.c
12 @@ -630,6 +630,9 @@ static void fts3DatabasePageSize(int *pRc, Fts3Table *p){
13 sqlite3_step(pStmt);
14 p->nPgsz = sqlite3_column_int(pStmt, 0);
15 rc = sqlite3_finalize(pStmt);
16 + }else if( rc==SQLITE_AUTH ){
17 + p->nPgsz = 1024;
18 + rc = SQLITE_OK;
19 }
20 }
21 assert( p->nPgsz>0 || rc!=SQLITE_OK );
OLDNEW
« no previous file with comments | « third_party/sqlite/amalgamation/sqlite3.c ('k') | third_party/sqlite/src/ext/fts3/fts3.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698