]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
If the SQLITE_ALLOW_URI_AUTHORITY compile-time option is set, then allow
authordrh <drh@noemail.net>
Wed, 7 Aug 2013 23:15:52 +0000 (23:15 +0000)
committerdrh <drh@noemail.net>
Wed, 7 Aug 2013 23:15:52 +0000 (23:15 +0000)
non-localhost authorities on URI filenames and pass them through as a UNC
to the underlying VFS.

FossilOrigin-Name: 3adb6c1bfda897859dc9cf9ae7f1e6719855ee68

manifest
manifest.uuid
src/main.c

index 190659f0f2e81798394967826fbba6ae2764f617..c9e8d0b68242bf6e06655b4e039a682ab7d6fd51 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sa\sguard\s#ifndef\sto\stest_intarray.h\sto\sprevent\sharm\sif\sit\sis\s#included\nmore\sthan\sonce.\s\sAdd\sa\scomment\son\sthe\sclosing\s#endif\sof\sthe\sguards\son\nsqlite3.h\sand\stest_multiplex.h.
-D 2013-08-07T14:18:45.279
+C If\sthe\sSQLITE_ALLOW_URI_AUTHORITY\scompile-time\soption\sis\sset,\sthen\sallow\nnon-localhost\sauthorities\son\sURI\sfilenames\sand\spass\sthem\sthrough\sas\sa\sUNC\nto\sthe\sunderlying\sVFS.
+D 2013-08-07T23:15:52.266
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -185,7 +185,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
 F src/legacy.c 0df0b1550b9cc1f58229644735e317ac89131f12
 F src/lempar.c cdf0a000315332fc9b50b62f3b5e22e080a0952b
 F src/loadext.c 867c7b330b740c6c917af9956b13b81d0a048303
-F src/main.c b2592b4119f9b34d20861d1a73a44f07d061508c
+F src/main.c 482135b0bf855d621ef10c5bb56c63df23b2ddec
 F src/malloc.c fe085aa851b666b7c375c1ff957643dc20a04bf6
 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
 F src/mem1.c 437c7c4af964895d4650f29881df63535caaa1fa
@@ -1105,7 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P f8d8790ede0fcaf6c5b60ac22919c1d97c74e838
-R 2f7b5cf183df4b523d2c445c6f8fcaa5
+P 0ad83ceb79767738bd06a28840cf84da0464ab4f
+R a230045986289598d392f4ac16d8f85f
 U drh
-Z cdc793001b4bb9536e6929a443adf8d1
+Z 3dff46ea9ed1198b77cd17bced6ea4de
index bcffddd0ea3fdbf3bbb5bdc917f0d37bdaed8c91..bb59190386ca4a601436dc1ccffbb7768109f173 100644 (file)
@@ -1 +1 @@
-0ad83ceb79767738bd06a28840cf84da0464ab4f
\ No newline at end of file
+3adb6c1bfda897859dc9cf9ae7f1e6719855ee68
\ No newline at end of file
index d848dc7f595dcdb787dda6829bb6dd51fb50384e..9e8a6ed06387030ead968c9c3996e0af2d60ea2b 100644 (file)
@@ -2178,20 +2178,20 @@ int sqlite3ParseUri(
     zFile = sqlite3_malloc(nByte);
     if( !zFile ) return SQLITE_NOMEM;
 
+    iIn = 5;
+#ifndef SQLITE_ALLOW_URI_AUTHORITY
     /* Discard the scheme and authority segments of the URI. */
     if( zUri[5]=='/' && zUri[6]=='/' ){
       iIn = 7;
       while( zUri[iIn] && zUri[iIn]!='/' ) iIn++;
-
       if( iIn!=7 && (iIn!=16 || memcmp("localhost", &zUri[7], 9)) ){
         *pzErrMsg = sqlite3_mprintf("invalid uri authority: %.*s", 
             iIn-7, &zUri[7]);
         rc = SQLITE_ERROR;
         goto parse_uri_out;
       }
-    }else{
-      iIn = 5;
     }
+#endif
 
     /* Copy the filename and any query parameters into the zFile buffer. 
     ** Decode %HH escape codes along the way.