Skip to content

Commit

Permalink
Only set authorizer if we intend to use it (safe_mode or open_basedir).
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed Jul 27, 2005
1 parent 86d81fd commit 2d920f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/pdo_sqlite/sqlite_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2d920f6

Please sign in to comment.