Ticket #50565: 50565.diff
File 50565.diff, 1022 bytes (added by , 4 years ago) |
---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
421 421 $image_file = wp_get_original_image_path( $attachment_id ); 422 422 $image_meta = wp_get_attachment_metadata( $attachment_id ); 423 423 424 if ( ! $image_meta || ! $image_file ) { 424 if ( 425 ! $image_meta || 426 ! $image_file || 427 ! wp_image_file_matches_image_meta( $request['src'], $image_meta ) 428 ) { 425 429 return new WP_Error( 426 430 'rest_unknown_attachment', 427 431 __( 'Unable to get meta information for file.' ), … … 1279 1283 'minimum' => 0, 1280 1284 'maximum' => 100, 1281 1285 ), 1286 'src' => array( 1287 'description' => __( 'URL to the edited image file.' ), 1288 'type' => 'string', 1289 'required' => true, 1290 ), 1282 1291 ); 1283 1292 } 1284 1293