summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-04-11 18:53:36 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-04-11 18:53:36 +0000
commitf9073ef5a0dc10817e4205d7eb7b81cce8a19c45 (patch)
treec83abd5430e628e5ee0a96cf73c83d941041e974
parentd478d178bf17efebbc322e8fd2efdb4e703b5bd4 (diff)
downloadphp-git-f9073ef5a0dc10817e4205d7eb7b81cce8a19c45.tar.gz
MFH: Open basedir & safe_mode exception when copying or attaching to a
memory only database.
-rw-r--r--ext/sqlite/sqlite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index 7f9300995b..798683cc7a 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -579,7 +579,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;
@@ -592,7 +592,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;