diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-04-11 18:53:32 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-04-11 18:53:32 +0000 |
commit | 8075d977e1fea44c74aaabbd78fb8b4365fdc1f7 (patch) | |
tree | 36b001c8ee5ff69b00406606a2edc5d0430e3bed /ext/sqlite | |
parent | 14e2e82cf542b8a35edb0ef65797936e53883d47 (diff) | |
download | php-git-8075d977e1fea44c74aaabbd78fb8b4365fdc1f7.tar.gz |
Open basedir & safe_mode exception when copying or attaching to a memory
only database.
Diffstat (limited to 'ext/sqlite')
-rw-r--r-- | ext/sqlite/sqlite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 6d72ce4278..bda880915f 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -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; |