mirror of
https://github.com/php/php-src.git
synced 2026-03-26 17:22:15 +01:00
MFH: Fixed bug #32937 (open_basedir looses trailing / in the limiter).
This commit is contained in:
@@ -109,8 +109,8 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
|
||||
/* Handler for basedirs that end with a / */
|
||||
resolved_basedir_len = strlen(resolved_basedir);
|
||||
if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
|
||||
if (resolved_basedir[resolved_basedir_len - 1] == '/') {
|
||||
resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
|
||||
if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
|
||||
resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
|
||||
resolved_basedir[++resolved_basedir_len] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user