mirror of https://github.com/CIRCL/PyCIRCLean
Skip the known extension check if mimetypes fails.
parent
9079eac90a
commit
b0d0912ff9
|
@ -109,7 +109,7 @@ class File(FileBase):
|
|||
if aliases.get(mimetype) is not None:
|
||||
mimetype = aliases.get(mimetype)
|
||||
expected_extensions = mimetypes.guess_all_extensions(mimetype, strict=False)
|
||||
if expected_extensions is not None:
|
||||
if expected_extensions:
|
||||
if len(self.extension) > 0 and self.extension not in expected_extensions:
|
||||
self.log_details.update({'expected_extensions': expected_extensions})
|
||||
self.make_dangerous()
|
||||
|
|
|
@ -85,7 +85,7 @@ class File(FileBase):
|
|||
if aliases.get(mimetype) is not None:
|
||||
mimetype = aliases.get(mimetype)
|
||||
expected_extensions = mimetypes.guess_all_extensions(mimetype, strict=False)
|
||||
if expected_extensions is not None:
|
||||
if expected_extensions:
|
||||
if len(self.extension) > 0 and self.extension not in expected_extensions:
|
||||
self.log_details.update({'expected_extensions': expected_extensions})
|
||||
self.make_dangerous()
|
||||
|
|
Loading…
Reference in New Issue