Ticket #16189: check for double periods.diff
| File check for double periods.diff, 1.0 KB (added by , 15 years ago) |
|---|
-
wp-admin/includes/file.php
301 301 $test_form = true; 302 302 $test_size = true; 303 303 $test_upload = true; 304 $test_filename = true; 304 305 305 306 // If you override this, you must provide $ext and $type!!!! 306 307 $test_type = true; … … 327 328 return call_user_func($upload_error_handler, $file, $error_msg); 328 329 } 329 330 331 // Ensure filenames don't contain more than one contiguous period character 332 if ( $test_filename && stristr( $file['name'], '..' ) !== false ) 333 return call_user_func($upload_error_handler, $file, __( 'Please rename your file to avoid ".." within the file name.' )); 334 330 335 // A properly uploaded file will pass this test. There should be no reason to override this one. 331 336 if ( $test_upload && ! @ is_uploaded_file( $file['tmp_name'] ) ) 332 337 return call_user_func($upload_error_handler, $file, __( 'Specified file failed upload test.' ));