Browse Source

- Add safe_mode/uid and open_basedir check to zip_open() (closes #16927).

experimental/new_ui_api
Markus Fischer 24 years ago
parent
commit
601cf3690c
  1. 11
      ext/zip/zip.c

11
ext/zip/zip.c

@ -128,9 +128,18 @@ PHP_FUNCTION(zip_open)
return;
}
if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_ALLOW_FILE_NOT_EXISTS))) {
RETURN_FALSE;
}
if (php_check_open_basedir(filename TSRMLS_CC)) {
RETURN_FALSE;
}
archive_p = zzip_opendir(filename);
if (archive_p == NULL) {
php_error(E_WARNING, "Cannot open zip archive %s", filename);
php_error(E_WARNING, "%s() Cannot open zip archive %s",
get_active_function_name(TSRMLS_C), filename);
RETURN_FALSE;
}

Loading…
Cancel
Save