diff --git a/bookwyrm/broadcast.py b/bookwyrm/broadcast.py index ee43f8185..301fe84f9 100644 --- a/bookwyrm/broadcast.py +++ b/bookwyrm/broadcast.py @@ -57,7 +57,7 @@ def broadcast_task(sender_id, activity, recipients): except requests.exceptions.HTTPError as e: # TODO: maybe keep track of users who cause errors errors.append({ - 'error': e, + 'error': str(e), 'recipient': recipient, 'activity': activity, }) diff --git a/bookwyrm/signatures.py b/bookwyrm/signatures.py index 0aa749182..7e3c637ff 100644 --- a/bookwyrm/signatures.py +++ b/bookwyrm/signatures.py @@ -44,8 +44,7 @@ def make_signature(sender, destination, date, digest): def make_digest(data): ''' creates a message digest for signing ''' - return 'SHA-256=' + b64encode(hashlib.sha256(data.encode('utf-8'))\ - .digest()).decode('utf-8') + return 'SHA-256=' + b64encode(hashlib.sha256(data).digest()).decode('utf-8') def verify_digest(request):