From 1d0de928fcce44d9536cfbf735e292ad3c48b3b2 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Sun, 23 Oct 2016 16:03:00 +0300 Subject: [PATCH] Remove legacy splitting of payload to 60 chars when creating Diaspora payloads It looks like new 0.6 diaspora doesn't understand these payloads any more. --- CHANGELOG.md | 6 ++++++ federation/protocols/diaspora/protocol.py | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index feacc0e..1f0045c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [unreleased] + +### Fixed +* Remove legacy splitting of payload to 60 chars when creating Diaspora payloads. Diaspora 0.6 doesn't understand these any more. + + ## [0.8.1] - 2016-10-18 ### Fixed diff --git a/federation/protocols/diaspora/protocol.py b/federation/protocols/diaspora/protocol.py index 5c851c2..afd17ef 100644 --- a/federation/protocols/diaspora/protocol.py +++ b/federation/protocols/diaspora/protocol.py @@ -361,10 +361,6 @@ class Protocol(BaseProtocol): self.create_encrypted_payload())).decode("ascii") else: payload = urlsafe_b64encode(self.create_payload()).decode("ascii") - # Split every 60 chars - payload = '\n'.join([payload[start:start+60] - for start in range(0, len(payload), 60)]) - payload = payload + "\n" etree.SubElement(env, "{%s}data" % nsmap["me"], {"type": "application/xml"}).text = payload sig_contents = payload + "." + \