Extra traversal check.

git-svn-id: https://develop.svn.wordpress.org/trunk@6520 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-12-29 03:14:33 +00:00
parent f2aa6e80cf
commit e605fb7f4d
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ function get_real_file_to_edit( $file ) {
} }
function validate_file( $file, $allowed_files = '' ) { function validate_file( $file, $allowed_files = '' ) {
if ( false !== strpos( $file, '..' ))
return 1;
if ( false !== strpos( $file, './' )) if ( false !== strpos( $file, './' ))
return 1; return 1;