-C Change\sthe\ssupported\sURI\soptions\sto\s"mode"\sand\s"cache".
-D 2011-05-03T10:22:32.361
+C Allow\sonly\s"localhost"\sand\s""\sas\sauthorities\sin\sURIs.\sDo\snot\sallow\sescapes\s(%HH)\sin\sthe\sauthority\spart\sof\sa\sURI.
+D 2011-05-03T11:53:20.345
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f
F src/lempar.c 7f026423f4d71d989e719a743f98a1cbd4e6d99e
F src/loadext.c 3ae0d52da013a6326310655be6473fd472347b85
-F src/main.c 8e13c02ec1992f94dcc06b4b2bc0001a79b3e68f
+F src/main.c 28da02efcab49fd4cc51008b5f6d27b742682807
F src/malloc.c 74c740e8ba22b806cfb980c8c0ddea1cbd54a20e
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c 00bd8265c81abb665c48fea1e0c234eb3b922206
F test/unixexcl.test 9d80a54d86d2261f660758928959368ffc36151e
F test/unordered.test e81169ce2a8f31b2c6b66af691887e1376ab3ced
F test/update.test 8bc86fd7ef1a00014f76dc6a6a7c974df4aef172
-F test/uri.test 2e2dea3054bc6b3e5e1bf43fbab09a847ed9eb5f
+F test/uri.test 858abdea53ac46844d52ba953fba78f15f0a463a
F test/utf16align.test 54cd35a27c005a9b6e7815d887718780b6a462ae
F test/vacuum.test 29b60e8cc9e573b39676df6c4a75fe9e02d04a09
F test/vacuum2.test 91a84c9b08adfc4472097d2e8deb0150214e0e76
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 7fdd0786c7e0d66baf3aba4485128e16a4e5ea46
-R 9466d8a507f14eedc64f1b5ce9c925cf
+P 0a694a0b27e3ce251ce313cb5d19a7637c2fa309
+R afa0474b6eff205d0a5c2d2e9845accd
U dan
-Z bebe00795592ddf7acadaf3bca1d1f57
+Z 0ad689b41032f94f1c384beb1085aa09
foreach {tn uri file} {
1 test.db test.db
2 file:test.db test.db
- 3 file://an-authorityPWD/test.db test.db
+ 3 file://PWD/test.db test.db
4 file:PWD/test.db test.db
5 file:test.db?mork=1 test.db
6 file:test.db?mork=1&tonglor=2 test.db
11 file:test%2Edb test.db
12 file file
13 http:test.db http:test.db
- 14 file://xyzPWD/test.db%3Fhello test.db?hello
+ 14 file://localhostPWD/test.db%3Fhello test.db?hello
15 file:test.db%00extra test.db
16 file:test%00.db%00extra test
} {
db close
}
-
#-------------------------------------------------------------------------
# Test that URI query parameters are passed through to the VFS layer
# correctly.
tvfs1 delete
tvfs2 delete
+#-------------------------------------------------------------------------
+# Check that only "" and "localhost" are acceptable as authorities.
+#
+catch {db close}
+foreach {tn uri res} {
+ 1 "file://localhost/PWD/test.db" {not an error}
+ 2 "file:///PWD/test.db" {not an error}
+ 3 "file:/PWD/test.db" {not an error}
+ 4 "file://l%6Fcalhost/PWD/test.db" {invalid uri authority: l%6Fcalhost}
+ 5 "file://lbcalhost/PWD/test.db" {invalid uri authority: lbcalhost}
+ 6 "file://x/PWD/test.db" {invalid uri authority: x}
+} {
+ set uri [string map [list PWD [string range [pwd] 1 end]] $uri]
+ do_test 6.$tn {
+ set DB [sqlite3_open $uri]
+ sqlite3_errmsg $DB
+ } $res
+ catch { sqlite3_close $DB }
+}
+
finish_test