summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjvoisin2012-02-07 14:18:26 +0100
committerjvoisin2012-02-07 14:18:26 +0100
commita86f9a31726f5afb7c2f3f958305af03878583b4 (patch)
tree84402f21a5f6826c53993e9564e6d125288e4de9 /lib
parent61439b1508d7512fa2e33725dff24c6c17440011 (diff)
Fix typo, and whitelist approach for png
Diffstat (limited to 'lib')
-rw-r--r--lib/images.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/images.py b/lib/images.py
index f4e884d..236d566 100644
--- a/lib/images.py
+++ b/lib/images.py
@@ -13,7 +13,7 @@ class JpegStripper(parser.GenericParser):
13 ''' 13 '''
14 return True if the field is compromizing 14 return True if the field is compromizing
15 ''' 15 '''
16 field_list = frozeset(['start_image', 'app0', 'start_frame', 16 field_list = frozenset(['start_image', 'app0', 'start_frame',
17 'start_scan', 'data', 'end_image']) 17 'start_scan', 'data', 'end_image'])
18 if field.name in field_list: 18 if field.name in field_list:
19 return False 19 return False
@@ -33,14 +33,9 @@ class PngStripper(parser.GenericParser):
33 ''' 33 '''
34 return True if the field is compromizing 34 return True if the field is compromizing
35 ''' 35 '''
36 name = field.name 36 field_list = frozenset(['id', 'header', 'physical', 'end'])
37 if name.startswith('text['): # textual meta 37 if field.name in field_list:
38 return True 38 return False
39 elif name.startswith('utf8_text['): # uncompressed adobe crap 39 if field.name.startswith('data['):
40 return True
41 elif name.startswith('compt_text['): # compressed adobe crap
42 return True
43 elif name == "time": # timestamp
44 return True
45 else:
46 return False 40 return False
41 return True