mirror of
https://github.com/php/php-src.git
synced 2024-12-03 06:44:07 +08:00
Added safe_mode & open_basedir checks for pg_lo_export()
@Added safe_mode & open_basedir checks for pg_lo_export() (Yasuo)
This commit is contained in:
parent
166ace3fa9
commit
a6384b3685
@ -2091,6 +2091,14 @@ PHP_FUNCTION(pg_lo_export)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (PG(safe_mode) &&(!php_checkuid(file_in, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir(file_in TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
|
||||
|
||||
if (lo_export(pgsql, oid, file_out)) {
|
||||
|
Loading…
Reference in New Issue
Block a user