mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
- fix regression introduced in 5.3.4 in open_basedir on windows/novell with trailing fwd slash
This commit is contained in:
parent
8cdcdb1b1e
commit
e3c920ecf3
1 changed files with 4 additions and 0 deletions
|
@ -229,7 +229,11 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
|
|||
if (expand_filepath(local_open_basedir, resolved_basedir TSRMLS_CC) != NULL) {
|
||||
/* Handler for basedirs that end with a / */
|
||||
resolved_basedir_len = strlen(resolved_basedir);
|
||||
#if defined(PHP_WIN32) || defined(NETWARE)
|
||||
if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR || basedir[strlen(basedir) - 1] == '/') {
|
||||
#else
|
||||
if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
|
||||
#endif
|
||||
if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
|
||||
resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
|
||||
resolved_basedir[++resolved_basedir_len] = '\0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue