mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-02 11:21:57 +01:00
Extra traversal check.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e2f66cbb1d
commit
5104e0dad0
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user