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:
Yasuo Ohgaki 2002-07-17 05:01:58 +00:00
parent 166ace3fa9
commit a6384b3685

View File

@ -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)) {