Make WordPress Core

Opened 14 months ago

Last modified 14 months ago

#60172 new defect (bug)

Incorrect APP1 Exif Identifier Code

Reported by: ainsleyclark's profile ainsleyclark Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

A warning is triggered in WordPress when trying to read EXIF data from images using the exif_read_data function. This issue is encountered in the image processing workflow, specifically in the wp_read_image_metadata function.

Stack trace is below:

/wp-admin/includes/image.php in wp_read_image_metadata at line 856
/wp-admin/includes/image.php in wp_create_image_subsizes at line 258
/wp-admin/includes/image.php in wp_generate_attachment_metadata at line 504
/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php in WC_Regenerate_Images::resize_and_return_image at line 402
/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php in WC_Regenerate_Images::maybe_resize_image at line 251

The error handling for the exif_read_data function should be reviewed to ensure that it gracefully handles scenarios where EXIF data is not formatted as expected.

Change History (2)

#1 @NekoJonez
14 months ago

Hi and welcome to Trac

Thank you for your ticket, but this trac is for WordPress core development only.
As your stack trace indicates that part of the error is comming from WooCommerce, can you test it without having any plugins installed?

If you still encounter the error without any plugins installed, can you give us the stack trace then?

If you dont encounter it anymore, you will be able to find help here: https://wordpress.org/support/plugin/woocommerce/

I wish you best of luck.

Kind regards

#2 @ainsleyclark
14 months ago

Hi there,

I did ponder opening an issue on their GitHub but I think it probably needs to be handled at the root. If the user does upload a corrupt file, would it not need ot be handled gracefully?

I found a similar issue here:
https://core.trac.wordpress.org/ticket/42480

Thank you.

Note: See TracTickets for help on using tickets.