Skip to content

Commit

Permalink
Added missing safe_mode & open_basedir checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed Jun 24, 2004
1 parent ca14c9b commit 81abbc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/standard/ftok.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ PHP_FUNCTION(ftok)
RETURN_LONG(-1);
}

if ((PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(pathname), NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(Z_STRVAL_PP(pathname) TSRMLS_CC)) {
RETURN_LONG(-1);
}

k = ftok(Z_STRVAL_PP(pathname),Z_STRVAL_PP(proj)[0]);

RETURN_LONG(k);
Expand Down

0 comments on commit 81abbc6

Please sign in to comment.