From bf76c7f6ec761eb10c4aece7068ac95f030d3ed8 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sun, 30 Apr 2017 10:39:48 +0200 Subject: [PATCH] Allow extended encoding in API --- src/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.py b/src/api.py index d6d0b266..c8612d60 100644 --- a/src/api.py +++ b/src/api.py @@ -650,8 +650,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): TTL = 4*24*60*60 elif len(params) == 6: toAddress, fromAddress, subject, message, encodingType, TTL = params - if encodingType != 2: - raise APIError(6, 'The encoding type must be 2 because that is the only one this program currently supports.') + if encodingType not in [2, 3]: + raise APIError(6, 'The encoding type must be 2 or 3.') subject = self._decode(subject, "base64") message = self._decode(message, "base64") if len(subject + message) > (2 ** 18 - 500):