Changeset 18543
- Timestamp:
- 08/13/2011 06:10:02 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r18534 r18543 3606 3606 */ 3607 3607 function validate_file( $file, $allowed_files = '' ) { 3608 if ( false !== strpos( $file, '..' ) )3608 if ( false !== strpos( $file, '..' ) ) 3609 3609 return 1; 3610 3610 3611 if ( false !== strpos( $file, './' ) )3611 if ( false !== strpos( $file, './' ) ) 3612 3612 return 1; 3613 3613 3614 if ( !empty ( $allowed_files ) && (!in_array( $file, $allowed_files )) )3614 if ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files ) ) 3615 3615 return 3; 3616 3616 3617 if (':' == substr( $file, 1, 1 ) )3617 if (':' == substr( $file, 1, 1 ) ) 3618 3618 return 2; 3619 3619
Note: See TracChangeset
for help on using the changeset viewer.