Improve the authorizer filter for ATTACH on fuzzcheck.
FossilOrigin-Name: 87d49e80878674470d280de79c8ade222dd006e65c90e79616c4f72c7c32dabb
This commit is contained in:
parent
f81b40a52d
commit
c8f7211d8f
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Provide\san\sassert()\sto\sfire\sfor\sapplications\sthat\sshould\snever\sopen\sor\screate\na\sdisk-based\sdatabase\sfile.
|
||||
D 2021-10-23T22:11:18.414
|
||||
C Improve\sthe\sauthorizer\sfilter\sfor\sATTACH\son\sfuzzcheck.
|
||||
D 2021-10-23T22:14:11.249
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -1055,7 +1055,7 @@ F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c
|
||||
F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634
|
||||
F test/fuzz_common.tcl b7197de6ed1ee8250a4f82d67876f4561b42ee8cbbfc6160dcb66331bad3f830
|
||||
F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2
|
||||
F test/fuzzcheck.c 7d9cf020fa4a1c52b09aa5f9daf5a0fa5a3edfd952e5933f0812735d138f7529
|
||||
F test/fuzzcheck.c a86cc34bcc91c4a882cbac0ccc7c903d27c2a520bd6006510b3371e7befdd09b
|
||||
F test/fuzzdata1.db d36e88741b4f23bcbaaf55b006290669d03c6c891cf13c7b3a53bc1b097b693f
|
||||
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
|
||||
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
||||
@ -1929,7 +1929,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 967b65623807ff992869da0a7d9b0105701939c4658a7aee37a30fb267869c6d
|
||||
R a9ff94845a8cffbce47542363f26ab35
|
||||
P 5218ac788ca35fdd7f98117758f0bef9d55fe7517098e7bf62fda3fed2af3d51
|
||||
R 17548d134303a4e483245fa3f87d916c
|
||||
U drh
|
||||
Z 2501f234de757bdac4c4fa55bb7c36cf
|
||||
Z 9ccb24f9c373f9b4367082008057e6de
|
||||
|
@ -1 +1 @@
|
||||
5218ac788ca35fdd7f98117758f0bef9d55fe7517098e7bf62fda3fed2af3d51
|
||||
87d49e80878674470d280de79c8ade222dd006e65c90e79616c4f72c7c32dabb
|
@ -762,12 +762,16 @@ static int block_troublesome_sql(
|
||||
oomCounter = atoi(zArg2);
|
||||
}
|
||||
}else if( eCode==SQLITE_ATTACH ){
|
||||
/* Deny the ATTACH if it is attaching anything other than an in-memory
|
||||
** database. */
|
||||
if( zArg1==0 ) return SQLITE_DENY;
|
||||
if( strcmp(zArg1,":memory:")!=0
|
||||
&& sqlite3_strglob("file:*[?]vfs=memdb", zArg1)!=0
|
||||
if( strcmp(zArg1,":memory:")==0 ) return SQLITE_OK;
|
||||
if( sqlite3_strglob("file:*[?]vfs=memdb", zArg1)==0
|
||||
&& sqlite3_strglob("file:*[^/a-zA-Z0-9_.]*[?]vfs=memdb", zArg1)!=0
|
||||
){
|
||||
return SQLITE_DENY;
|
||||
return SQLITE_OK;
|
||||
}
|
||||
return SQLITE_DENY;
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user