iliaa           Tue Jul 26 22:35:38 2005 EDT

  Modified files:              
    /php-src/ext/pdo_sqlite     sqlite_driver.c 
  Log:
  Only set authorizer if we intend to use it (safe_mode or open_basedir).
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo_sqlite/sqlite_driver.c?r1=1.19&r2=1.20&ty=u
Index: php-src/ext/pdo_sqlite/sqlite_driver.c
diff -u php-src/ext/pdo_sqlite/sqlite_driver.c:1.19 
php-src/ext/pdo_sqlite/sqlite_driver.c:1.20
--- php-src/ext/pdo_sqlite/sqlite_driver.c:1.19 Fri Jun 10 01:49:48 2005
+++ php-src/ext/pdo_sqlite/sqlite_driver.c      Tue Jul 26 22:35:37 2005
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: sqlite_driver.c,v 1.19 2005/06/10 05:49:48 wez Exp $ */
+/* $Id: sqlite_driver.c,v 1.20 2005/07/27 02:35:37 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -706,7 +706,9 @@
                goto cleanup;
        }
 
-       sqlite3_set_authorizer(H->db, authorizer, NULL);
+       if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
+               sqlite3_set_authorizer(H->db, authorizer, NULL);
+       }
 
        if (driver_options) {
                timeout = pdo_attr_lval(driver_options, PDO_ATTR_TIMEOUT, 
timeout TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to