diff --git a/project.clj b/project.clj index 741cfce..9885a49 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject spamscope "2.8.0-SNAPSHOT" +(defproject spamscope "2.8.1-SNAPSHOT" :resource-paths ["_resources"] :target-path "_build" :min-lein-version "2.0.0" diff --git a/src/modules/attachments/attachments.py b/src/modules/attachments/attachments.py index eb49961..32706d1 100644 --- a/src/modules/attachments/attachments.py +++ b/src/modules/attachments/attachments.py @@ -354,10 +354,14 @@ def withhashes(cls, attachments=[]): payload = base64.b64decode(i["payload"]) except TypeError, e: try: + # try to add === to decode base64 payload = base64.b64decode(i["payload"] + "===") - i.setdefault("errors", []).append(repr(e)) except TypeError: - continue + # if fails maybe is text, with fake base64 header + payload = i["payload"] + finally: + i.setdefault("errors", []).append( + repr(e) + " Fake base64") else: payload = i["payload"] diff --git a/src/options.py b/src/options.py index 661e2ae..28a4822 100644 --- a/src/options.py +++ b/src/options.py @@ -19,7 +19,7 @@ from os.path import join -__version__ = "2.8.0" +__version__ = "2.8.1" __configuration_path__ = "/etc/spamscope" __defaults__ = {