mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MFH: Do not set authorizer unless safe_mode or open_basedir are being used.
This commit is contained in:
parent
3e46adb183
commit
cbb928b8eb
1 changed files with 3 additions and 1 deletions
|
@ -1177,7 +1177,9 @@ static struct php_sqlite_db *php_sqlite_open(char *filename, int mode, char *per
|
|||
/* 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 */
|
||||
sqlite_set_authorizer(sdb, php_sqlite_authorizer, NULL);
|
||||
if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
|
||||
sqlite_set_authorizer(sdb, php_sqlite_authorizer, NULL);
|
||||
}
|
||||
|
||||
db->rsrc_id = ZEND_REGISTER_RESOURCE(object ? NULL : return_value, db, persistent_id ? le_sqlite_pdb : le_sqlite_db);
|
||||
if (object) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue