mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Extra traversal check.
git-svn-id: https://develop.svn.wordpress.org/trunk@6520 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -43,6 +43,9 @@ function get_real_file_to_edit( $file ) {
|
||||
}
|
||||
|
||||
function validate_file( $file, $allowed_files = '' ) {
|
||||
if ( false !== strpos( $file, '..' ))
|
||||
return 1;
|
||||
|
||||
if ( false !== strpos( $file, './' ))
|
||||
return 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user