From 2d920f684890e00597c4aac300b67539367e58e6 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 27 Jul 2005 02:35:37 +0000 Subject: [PATCH] Only set authorizer if we intend to use it (safe_mode or open_basedir). --- ext/pdo_sqlite/sqlite_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 14957b3ffb..e3734d4a7c 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -706,7 +706,9 @@ static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS 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); -- 2.40.0