Browse Source

MFH: Fixed bug #32937 (open_basedir looses trailing / in the limiter).

PHP-5.1
Ilia Alshanetsky 21 years ago
parent
commit
72857b6dbb
  1. 1
      NEWS
  2. 4
      main/fopen_wrappers.c

1
NEWS

@ -129,6 +129,7 @@ PHP NEWS
- Fixed bug #33326 (Cannot build extensions with phpize on Macosx). (Jani)
- Fixed bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.54
seg fault). (Dmitry)
- Fixed bug #32937 (open_basedir looses trailing / in the limiter). (Adam Conrad)
- Fixed bug #32589 (possible crash inside imap_mail_compose() function). (Ilia)
- Fixed bug #32139 (SOAP client does not auto-handle base64 encoding). (Ilia)
- Fixed bug #32010 (Memory leak in mssql_fetch_batch). (fmk)

4
main/fopen_wrappers.c

@ -108,8 +108,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';
}
}

Loading…
Cancel
Save