]> granicus.if.org Git - php/commitdiff
Open basedir & safe_mode exception when copying or attaching to a memory
authorIlia Alshanetsky <iliaa@php.net>
Sun, 11 Apr 2004 18:53:32 +0000 (18:53 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 11 Apr 2004 18:53:32 +0000 (18:53 +0000)
only database.

ext/sqlite/sqlite.c

index 6d72ce42788834829156383aba87e8908068ca3a..bda880915f4c7cd1c6e41afd0b3fda90895d9e03 100644 (file)
@@ -685,7 +685,7 @@ static int php_sqlite_authorizer(void *autharg, int access_type, const char *arg
 {
        switch (access_type) {
                case SQLITE_COPY:
-                       {
+                       if (strncmp(arg4, ":memory:", sizeof(":memory:") - 1)) {
                                TSRMLS_FETCH();
                                if (PG(safe_mode) && (!php_checkuid(arg4, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
                                        return SQLITE_DENY;
@@ -698,7 +698,7 @@ static int php_sqlite_authorizer(void *autharg, int access_type, const char *arg
                        return SQLITE_OK;
 #ifdef SQLITE_ATTACH
                case SQLITE_ATTACH:
-                       {
+                       if (strncmp(arg3, ":memory:", sizeof(":memory:") - 1)) {
                                TSRMLS_FETCH();
                                if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
                                        return SQLITE_DENY;