Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exiv2 allows the user to set invalid dates #2718

Open
infinity0 opened this issue Jul 22, 2023 · 0 comments
Open

exiv2 allows the user to set invalid dates #2718

infinity0 opened this issue Jul 22, 2023 · 0 comments
Labels

Comments

@infinity0
Copy link

Describe the bug

exiv2 allows the user to set invalid dates, such as those in the common format YYYY-mm-dd HH:MM:SS.

In EXIF the dashes must be colons instead. exiv2 doesn't check this, allowing the user to set an invalid date without any warning.

To Reproduce

Find any JPEG file and copy it to test1.JPG

$ x=test1.JPG
$ d="2023-07-21 21:06:26"
$ exiv2 \
  -M "set Exif.Image.DateTime $d" \
  -M "set Exif.Photo.DateTimeOriginal $d" \
  -M "set Exif.Photo.DateTimeDigitized $d" \
  "$x"

Expected behavior

exiv2 should not let me set date strings that are not formatted correctly as per the EXIF specification, at least not without a clear obvious warning.

Additionally, exiv2 should print warnings about invalid dates. At the moment, this doesn't occur even with -v.

Desktop (please complete the following information):

  • Exiv2 version and source: (e.g., 0.27.6 from Debian)

Additional context

@infinity0 infinity0 added the bug label Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant