Page MenuHomePhabricator

EXIF date prefill does not deal with insane dates well
Open, LowPublic

Description

Author: neilk

Description:
If it encounter an EXIF value like DateTimeDigitized: "0000:00:00 00:00:00" it parses the date wrong.

For this value, we get Nov 30, 1899.

This suggests we are blindly using the numbers given, with offsets for the month (this is year zero, 1900, and month 0 == month -1, day 0 = day -1, at midnight).

Solution (?) check dates for sanity before prefilling. Year, month, and day of zero are all impossible.


Version: unspecified
Severity: minor

Details

Reference
bz26090

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:18 PM
bzimport added a project: UploadWizard.
bzimport set Reference to bz26090.
bzimport added a subscriber: Unknown Object (MLST).

neilk wrote:

(In reply to comment #1)

Fixed in r87984

I don't think this revision solves the problem at all. All this revision does is to reject older dates. It's quite possible for people to encode EXIF dates retroactively.

Thehelpfulonewiki wrote:

Reassigning to wikibugs-l per bug 37789

How is this to be accomplished? Is only checking for 1<=month<=12 and so on enough?