Invert the UNTRUSTED_SCHEMA setting to be TRUSTED_SCHEMA.
FossilOrigin-Name: f5fcf1fbc6473f8e91315b14d67745f2748010641b7463d1f4ca51e6fdf97462
This commit is contained in:
parent
46d987405c
commit
b77da374ab
20
manifest
20
manifest
@ -1,5 +1,5 @@
|
||||
C Merge\srecent\sfixes\sfrom\strunk.
|
||||
D 2020-01-07T15:44:22.828
|
||||
C Invert\sthe\sUNTRUSTED_SCHEMA\ssetting\sto\sbe\sTRUSTED_SCHEMA.
|
||||
D 2020-01-07T16:09:11.843
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -492,7 +492,7 @@ F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c 5ba8fd376f539240939ae76b5bc9fa7ad9a0d86e9914ecd11eb7002204138c11
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c d74f5e7bd51f3c9d283442473eb65aef359664efd6513591c03f01881c4ae2da
|
||||
F src/main.c 1505cc36860dcbfbe62579de97637b0d757282b810ead96095b8ca6be2e13c4b
|
||||
F src/main.c 6ba00f15f0e7d36a12136ac390a403de4c4b47b76733d1cad60c2b23b4a2cf1d
|
||||
F src/malloc.c eaa4dc9602ce28b077f7de2eb275db2be270c5cc56d7fec5466301bd9b80e2f5
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
||||
@ -526,14 +526,14 @@ F src/pragma.h 5bbfafd74cf085762b64e4e2b00242917951b30468e380bddd8be6c21789aec2
|
||||
F src/prepare.c 6049beb71385f017af6fc320d2c75a4e50b75e280c54232442b785fbb83df057
|
||||
F src/printf.c 9be6945837c839ba57837b4bc3af349eba630920fa5532aa518816defe42a7d4
|
||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||
F src/resolve.c f35aa580fd29a9213f43bc267f486bb26430352bf78d1ceef4a4c9735b4c9d24
|
||||
F src/resolve.c 894397f372b5c23fb68e0c534d3682f45285f228bb335d713344a7ed37f0ba45
|
||||
F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
|
||||
F src/select.c 80d1aac7017824b803c8e6bdb75f699e11aef22e02d29d206a523d8a3dcf2a13
|
||||
F src/shell.c.in 6893d5b8d598aa59457c1490b8c9970c9b8d19d5f37951b3f831a0cd5f45a57c
|
||||
F src/sqlite.h.in b2dc8fc4db9496b3b9c06d68026d83976e9b76afc8b53d16aadb68f3e5cc3ca0
|
||||
F src/shell.c.in 43d3cfbee97d78ca5782dc53e4c1e22d3cc15c91beff20889dc60551f47eab9f
|
||||
F src/sqlite.h.in 972e3473e096cd322abe136caa5cc443c94a93a984030aa07824f0410667d04b
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 72af51aa4e912e14cd495fb6e7fac65f0940db80ed950d90911aff292cc47ce2
|
||||
F src/sqliteInt.h badbde0a53c2fb8311d7cd7f177a7bef70002658daa61d3effcaef365adb5f4b
|
||||
F src/sqliteInt.h 8c1fcdad7418c87cd482d2868610ed299e0201091e247598495e92e9c5d8e884
|
||||
F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
|
||||
F src/status.c 9ff2210207c6c3b4d9631a8241a7d45ab1b26a0e9c84cb07a9b5ce2de9a3b278
|
||||
F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
|
||||
@ -1853,7 +1853,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 9c50f6c28a4cadb2c33954c066a8e94f8aaf4c31b6c0309db35efc472cb0bcaa 03c1d75ddc063469fc856114595bd12d21759fe0979ce1ba1cf52e48e6b0d4a1
|
||||
R 3f9c42e2a1153621e11e54b50f905166
|
||||
P 5dfa33a09e608d26549e46c58a5563754688af68fa99415f9a548e91f81aca7c
|
||||
R a21ed46e9ca0e50811978a859d8bcb1e
|
||||
U drh
|
||||
Z ce4d5892a82ed81a290c1004012f18cc
|
||||
Z 4afc7b0d302d12e9a276c855c439b690
|
||||
|
@ -1 +1 @@
|
||||
5dfa33a09e608d26549e46c58a5563754688af68fa99415f9a548e91f81aca7c
|
||||
f5fcf1fbc6473f8e91315b14d67745f2748010641b7463d1f4ca51e6fdf97462
|
@ -887,7 +887,7 @@ int sqlite3_db_config(sqlite3 *db, int op, ...){
|
||||
{ SQLITE_DBCONFIG_DQS_DDL, SQLITE_DqsDDL },
|
||||
{ SQLITE_DBCONFIG_DQS_DML, SQLITE_DqsDML },
|
||||
{ SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, SQLITE_LegacyFileFmt },
|
||||
{ SQLITE_DBCONFIG_UNTRUSTED_SCHEMA, SQLITE_UnsafeSchema },
|
||||
{ SQLITE_DBCONFIG_TRUSTED_SCHEMA, SQLITE_TrustedSchema },
|
||||
};
|
||||
unsigned int i;
|
||||
rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
|
||||
@ -3127,7 +3127,9 @@ static int openDatabase(
|
||||
| SQLITE_EnableTrigger
|
||||
| SQLITE_EnableView
|
||||
| SQLITE_CacheSpill
|
||||
|
||||
#if !defined(SQLITE_TRUSTED_SCHEMA) || SQLITE_TRUSTED_SCHEMA+0!=0
|
||||
| SQLITE_TrustedSchema
|
||||
#endif
|
||||
/* The SQLITE_DQS compile-time option determines the default settings
|
||||
** for SQLITE_DBCONFIG_DQS_DDL and SQLITE_DBCONFIG_DQS_DML.
|
||||
**
|
||||
|
@ -891,7 +891,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
&& !IN_RENAME_OBJECT
|
||||
){
|
||||
if( (pDef->funcFlags & SQLITE_FUNC_DIRECT)!=0
|
||||
|| (pParse->db->flags & SQLITE_UnsafeSchema)!=0
|
||||
|| (pParse->db->flags & SQLITE_TrustedSchema)==0
|
||||
){
|
||||
/* Functions prohibited in triggers and views if:
|
||||
** (1) tagged with SQLITE_DIRECTONLY
|
||||
|
@ -7173,7 +7173,7 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
{ "no_ckpt_on_close", SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE },
|
||||
{ "reset_database", SQLITE_DBCONFIG_RESET_DATABASE },
|
||||
{ "trigger_eqp", SQLITE_DBCONFIG_TRIGGER_EQP },
|
||||
{ "untrusted_schema", SQLITE_DBCONFIG_UNTRUSTED_SCHEMA },
|
||||
{ "trusted_schema", SQLITE_DBCONFIG_TRUSTED_SCHEMA },
|
||||
{ "writable_schema", SQLITE_DBCONFIG_WRITABLE_SCHEMA },
|
||||
};
|
||||
int ii, v;
|
||||
|
@ -2265,14 +2265,13 @@ struct sqlite3_mem_methods {
|
||||
** compile-time option.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_UNTRUSTED_SCHEMA]]
|
||||
** <dt>SQLITE_DBCONFIG_UNTRUSTED_SCHEMA</td>
|
||||
** <dd>The SQLITE_DBCONFIG_UNTRUSTED_SCHEMA option tells the SQLite
|
||||
** database connection that the schemas of the database files it reads
|
||||
** might contain malicious corruption intended to harm the application.
|
||||
** When the SQLITE_DBCONFIG_UNTRUSTED_SCHEMA option is enabled, SQLite
|
||||
** takes additional defensive steps including, but not limited to, the
|
||||
** following:
|
||||
** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]]
|
||||
** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</td>
|
||||
** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells the SQLite to
|
||||
** assume that database schemas are untainted by malicious content.
|
||||
** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite
|
||||
** takes additional defensive steps to protect the application from harm
|
||||
** including, but not limited to, the following:
|
||||
** <ul>
|
||||
** <li> Prohibit the use of SQL functions inside triggers, views,
|
||||
** CHECK constraints, DEFAULT VALUEs, index definitions, and/or
|
||||
@ -2281,8 +2280,8 @@ struct sqlite3_mem_methods {
|
||||
** <li> Pohibit the use of virtual tables inside of triggers and/or views
|
||||
** unless those virtual tables are tagged with [SQLITE_VTAB_INNOCUOUS].
|
||||
** </ul>
|
||||
** This setting defaults to "off" for legacy compatibility, however
|
||||
** all applications are advised to turn it on if possible.
|
||||
** This setting defaults to "on" for legacy compatibility, however
|
||||
** all applications are advised to turn it off if possible.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]]
|
||||
@ -2325,7 +2324,7 @@ struct sqlite3_mem_methods {
|
||||
#define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
|
||||
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
|
||||
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
|
||||
#define SQLITE_DBCONFIG_UNTRUSTED_SCHEMA 1017 /* int int* */
|
||||
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
|
||||
#define SQLITE_DBCONFIG_MAX 1017 /* Largest DBCONFIG */
|
||||
|
||||
/*
|
||||
|
@ -1581,7 +1581,7 @@ struct sqlite3 {
|
||||
#define SQLITE_CkptFullFSync 0x00000010 /* Use full fsync for checkpoint */
|
||||
#define SQLITE_CacheSpill 0x00000020 /* OK to spill pager cache */
|
||||
#define SQLITE_ShortColNames 0x00000040 /* Show short columns names */
|
||||
#define SQLITE_UnsafeSchema 0x00000080 /* Disallow unsafe functions and
|
||||
#define SQLITE_TrustedSchema 0x00000080 /* Allow unsafe functions and
|
||||
** vtabs in the schema definition */
|
||||
#define SQLITE_NullCallback 0x00000100 /* Invoke the callback once if the */
|
||||
/* result set is empty */
|
||||
|
Loading…
Reference in New Issue
Block a user