diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 04:17:45 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 04:17:45 +0000 |
commit | da8df5546dc8fbccfa572000c855da51b60c5e55 (patch) | |
tree | 53af2117dc47d1f86cc9cd7bd80db7258eb67849 /third_party/sqlite/fts3_85522.patch | |
parent | 2907bd6938108dd247cf3fa4eee5a8b49c7a99fc (diff) | |
download | chromium_src-da8df5546dc8fbccfa572000c855da51b60c5e55.zip chromium_src-da8df5546dc8fbccfa572000c855da51b60c5e55.tar.gz chromium_src-da8df5546dc8fbccfa572000c855da51b60c5e55.tar.bz2 |
Fix authorizer issue with fts3 in WebDatabase.
fts3 itself was authorized, but the most recent fts3 implementation
calls PRAGMA page_size, and PRAGMA was not authorized.
BUG=85522
TEST=See bug.
Review URL: http://codereview.chromium.org/7230021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90163 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite/fts3_85522.patch')
-rw-r--r-- | third_party/sqlite/fts3_85522.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/third_party/sqlite/fts3_85522.patch b/third_party/sqlite/fts3_85522.patch new file mode 100644 index 0000000..8d7d181 --- /dev/null +++ b/third_party/sqlite/fts3_85522.patch @@ -0,0 +1,21 @@ +Fix http://crbug.com/85522 + +WebDatabase uses an authorizer to prevent inappropriate access. +fts3.c uses 'PRAGMA page_size' to tune the query optimizer, but PRAGMA +is on the disallowed list. This patch adds a default return value for +SQLITE_AUTH failures. + +diff --git src/ext/fts3/fts3.c src/ext/fts3/fts3.c +index 8498cfa..dfa3891 100644 +--- src/ext/fts3/fts3.c ++++ src/ext/fts3/fts3.c +@@ -630,6 +630,9 @@ static void fts3DatabasePageSize(int *pRc, Fts3Table *p){ + sqlite3_step(pStmt); + p->nPgsz = sqlite3_column_int(pStmt, 0); + rc = sqlite3_finalize(pStmt); ++ }else if( rc==SQLITE_AUTH ){ ++ p->nPgsz = 1024; ++ rc = SQLITE_OK; + } + } + assert( p->nPgsz>0 || rc!=SQLITE_OK ); |