FreshPorts -- The Place For Ports If you buy from Amazon USA, please support us by using this link.
Follow us
Blog
Twitter

I am looking for an LTO tape library. Do you have one to spare?
Help with ports
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 php5-sqlite (PHP 5.4 patch)
Author: DevZone 
Date:   20-05-12 05:12

diff -rupN original/sqlite.c new/sqlite.c
--- original/sqlite.c 2012-05-20 07:36:59.000000000 +0300
+++ new/sqlite.c 2012-05-20 07:55:43.000000000 +0300
@@ -1066,10 +1066,6 @@ static int php_sqlite_authorizer(void *a
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;
- }
-
if (php_check_open_basedir(arg4 TSRMLS_CC)) {
return SQLITE_DENY;
}
@@ -1079,10 +1075,6 @@ static int php_sqlite_authorizer(void *a
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;
- }
-
if (php_check_open_basedir(arg3 TSRMLS_CC)) {
return SQLITE_DENY;
}
@@ -1166,7 +1158,7 @@ static void sqlite_object_new(zend_class
memset(intern, 0, sizeof(sqlite_object));

zend_object_std_init(&intern->std, class_type TSRMLS_CC);
- zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+ object_properties_init(&intern->std, class_type);

retval->handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) sqlite_object_free_storage, NULL TSRMLS_CC);
retval->handlers = handlers;
@@ -1510,7 +1502,7 @@ static struct php_sqlite_db *php_sqlite_
/* authorizer hook so we can enforce safe mode
* Note: the declaration of php_sqlite_authorizer is correct for 2.8.2 of libsqlite,
* and IS backwards binary compatible with earlier versions */
- if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
+ if ( (PG(open_basedir) && *PG(open_basedir)) ) {
sqlite_set_authorizer(sdb, php_sqlite_authorizer, NULL);
}

@@ -1569,8 +1561,7 @@ PHP_FUNCTION(sqlite_popen)
RETURN_FALSE;
}

- if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) ||
- php_check_open_basedir(fullpath TSRMLS_CC)) {
+ if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
RETURN_FALSE;
}
@@ -1656,8 +1647,7 @@ PHP_FUNCTION(sqlite_open)
}
}

- if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) ||
- php_check_open_basedir(fullpath TSRMLS_CC)) {
+ if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
zend_restore_error_handling(&error_handling TSRMLS_CC);
if (object) {
@@ -1710,8 +1700,7 @@ PHP_FUNCTION(sqlite_factory)
RETURN_NULL();
}

- if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) ||
- php_check_open_basedir(fullpath TSRMLS_CC)) {
+ if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
zend_restore_error_handling(&error_handling TSRMLS_CC);
RETURN_NULL();

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 php5-sqlite (PHP 5.4 patch)   new
DevZone 20-05-12 05:12 
 Re: php5-sqlite (PHP 5.4 patch)   new
DevZone 20-05-12 05:57 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.


Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD
Valid HTML, CSS, and RSS.
Copyright © 2000-2014 Dan Langille. All rights reserved.