Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#35325 closed defect (bug) (duplicate)

Image metadata not created when IPTC keywords are non-utf8

Reported by: johsw's profile johsw Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

If an image contains non-utf8 IPTC-keywords attachment metadata are not created properly.

The problem is in the function wp_read_image_metadata. Keywords are added to the $meta array (line 334), but the values are not checked for utf8 as other $meta-values are (line 407).

This is causes problems, several places places like media library, when using press images from non-english speaking countries, like Denmark

Attachments (2)

35325.patch (666 bytes) - added by johsw 9 years ago.
A patch for 35325
iptc_wp_fail.jpg (225.5 KB) - added by johsw 9 years ago.
Here is a file that image file that can be used to validate the problem.

Download all attachments as: .zip

Change History (5)

#1 @johsw
9 years ago

The functionality is introduced in this ticket: https://core.trac.wordpress.org/ticket/33772 and committed here: https://core.trac.wordpress.org/changeset/34374

@johsw
9 years ago

A patch for 35325

@johsw
9 years ago

Here is a file that image file that can be used to validate the problem.

#2 @swissspidy
9 years ago

  • Keywords has-patch needs-unit-tests added

#3 @johnbillion
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version set to 4.4

Duplicate of #35316.

Thanks for the patch, @johsw. This was actually fixed recently in [36430]. Sorry your patch got missed!

Note: See TracTickets for help on using tickets.