aboutsummaryrefslogtreecommitdiffstats
path: root/scanner/PhotoAlbum.py
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-03-29 15:42:53 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-03-29 15:42:53 +0200
commit836503156d7681c564277d229556315fb182f75f (patch)
treea009208a42f3c9662ff82e3a08353510a1e7210d /scanner/PhotoAlbum.py
parentDon't allow header injection. (diff)
downloadPhotoFloat-836503156d7681c564277d229556315fb182f75f.tar.xz
PhotoFloat-836503156d7681c564277d229556315fb182f75f.zip
Sometimes exif strings are null terminated, and python imagining library doesn't deal with that for us.
Diffstat (limited to 'scanner/PhotoAlbum.py')
-rw-r--r--scanner/PhotoAlbum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py
index 78bdb63..ea4e6c2 100644
--- a/scanner/PhotoAlbum.py
+++ b/scanner/PhotoAlbum.py
@@ -146,7 +146,7 @@ class Photo(object):
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
if isinstance(value, str):
- value = value.strip()
+ value = value.strip().partition("\x00")[0]
if isinstance(decoded, str) and decoded.startswith("DateTime"):
try:
value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S')