diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/adapter/model/mail.py | 4 | ||||
-rw-r--r-- | service/pixelated/resources/sandbox_resource.py | 3 | ||||
-rw-r--r-- | service/requirements.txt | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/service/pixelated/adapter/model/mail.py b/service/pixelated/adapter/model/mail.py index 76df076e..a24818c0 100644 --- a/service/pixelated/adapter/model/mail.py +++ b/service/pixelated/adapter/model/mail.py @@ -19,11 +19,11 @@ import logging from email import message_from_file from email.mime.text import MIMEText from email.header import Header +from hashlib import sha256 import binascii from email.MIMEMultipart import MIMEMultipart from email.mime.nonmultipart import MIMENonMultipart -from pycryptopp.hash import sha256 import leap.mail.walk as walk from pixelated.adapter.model.status import Status from pixelated.support import date @@ -137,7 +137,7 @@ class Mail(object): return self._mime_multipart.as_string() def _get_chash(self): - return sha256.SHA256(self.raw).hexdigest() + return sha256(self.raw).hexdigest() class InputMail(Mail): diff --git a/service/pixelated/resources/sandbox_resource.py b/service/pixelated/resources/sandbox_resource.py index 28e8c9be..35f99774 100644 --- a/service/pixelated/resources/sandbox_resource.py +++ b/service/pixelated/resources/sandbox_resource.py @@ -31,4 +31,7 @@ class SandboxResource(File): request.setHeader('Content-Security-Policy', self.CSP_HEADER_VALUES) request.setHeader('X-Content-Security-Policy', self.CSP_HEADER_VALUES) request.setHeader('X-Webkit-CSP', self.CSP_HEADER_VALUES) + request.setHeader('Access-Control-Allow-Origin', '*') + request.setHeader('Access-Control-Allow-Methods', 'GET') + return super(SandboxResource, self).render_GET(request) diff --git a/service/requirements.txt b/service/requirements.txt index b74b7f94..48d55ac2 100644 --- a/service/requirements.txt +++ b/service/requirements.txt @@ -7,7 +7,6 @@ pyasn1==0.1.8 requests==2.9.1 srp==1.0.4 whoosh==2.5.7 -pycryptopp -e 'git+https://github.com/pixelated/leap_pycommon.git@develop#egg=leap.common' -e 'git+https://github.com/pixelated/leap_auth.git#egg=leap.auth' -e 'git+https://github.com/pixelated/soledad.git@develop#egg=leap.soledad.common&subdirectory=common/' |