Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#31043 closed defect (bug) (fixed)

wp_read_image_metadata is looking for invalid EXIF data

Reported by: themiked's profile theMikeD Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.2 Priority: normal
Severity: normal Version: 3.0
Component: Media Keywords: has-patch
Focuses: Cc:

Description

wp_read_image_metadata() is used to determine which info found in the the IPTC and EXIF header for an image gets inserted into the database. Unfortunately one of the tests it's doing is looking for an EXIF entry that doesn't exist.

From everything I can determine there is no such tag as EXIF:Title, which is being looked for on line 341 of wp-admin/includes/image.php

This test should be removed.

[reference]http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/index.html

Attachments (1)

31043.patch (729 bytes) - added by tyxla 10 years ago.
This is correct - EXIF Title indeed appears to not exist, which makes this piece of code unusable. I suggest that we should remove it as unnecessary. Also, nothing further should be done, as in the lines below, EXIF ImageDescription will be set as title (if not longer than 80 characters). Submitting a patch with the removed code.

Download all attachments as: .zip

Change History (6)

@tyxla
10 years ago

This is correct - EXIF Title indeed appears to not exist, which makes this piece of code unusable. I suggest that we should remove it as unnecessary. Also, nothing further should be done, as in the lines below, EXIF ImageDescription will be set as title (if not longer than 80 characters). Submitting a patch with the removed code.

#1 @tyxla
10 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.2

#3 @DrewAPicture
10 years ago

  • Focuses docs removed
  • Type changed from enhancement to defect (bug)

#4 @SergeyBiryukov
10 years ago

  • Version changed from 4.1 to 3.0

Introduced in [13244].

#5 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 31462:

Don't try to read a non-existent Exif:Title tag in wp_read_image_metadata(), as it's not a part of the Exif standard.

props tyxla.
fixes #31043.

Note: See TracTickets for help on using tickets.