Browse Source

(php_checkuid) Added case for root directory when mode is

not CHECKUID_ALLOW_ONLY_DIR.
experimental/ZendEngine2
James E. Flemer 24 years ago
parent
commit
6a6b5a6108
  1. 5
      main/safe_mode.c

5
main/safe_mode.c

@ -98,7 +98,10 @@ PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
/* Trim off filename */
if ((s = strrchr(path, DEFAULT_SLASH))) {
*s = '\0';
if (s == path)
path[1] = '\0';
else
*s = '\0';
}
} else { /* CHECKUID_ALLOW_ONLY_DIR */
s = strrchr(filename, DEFAULT_SLASH);

Loading…
Cancel
Save