- Core:
. Fixed bug #60227 (header() cannot detect the multi-line header with
CR(0x0D)). (rui)
+ . Fixed bug #52624 (tempnam() by-pass open_basedir with inexistent directory).
+ (Felipe)
- OpenSSL:
. Fixed bug #60279 (Fixed NULL pointer dereference in
RETVAL_FALSE;
- if ((fd = php_open_temporary_fd(dir, p, &opened_path TSRMLS_CC)) >= 0) {
+ if ((fd = php_open_temporary_fd_ex(dir, p, &opened_path, 1 TSRMLS_CC)) >= 0) {
close(fd);
RETVAL_STRING(opened_path, 0);
}
--- /dev/null
+--TEST--
+Bug #52624 (tempnam() by-pass open_basedir with inexistent directory)
+--INI--
+open_basedir=.
+--FILE--
+<?php
+
+echo tempnam("directory_that_not_exists", "prefix_");
+
+?>
+--EXPECTF--
+Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (%s) in %s on line %d