Skip to content

Commit f69b134

Browse files
seba-alnClient Engineering Bot
andauthored
Fix error in encryption (#126)
* Fix error in encryption * PubNub SDK v6.3.3 release. * Update CHANGELOG.md * Update .pubnub.yml Co-authored-by: Client Engineering Bot <60980775+Client Engineering [email protected]>
1 parent 554e72e commit f69b134

File tree

6 files changed

+28
-8
lines changed

6 files changed

+28
-8
lines changed

.pubnub.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: python
2-
version: 6.3.2
2+
version: 6.3.3
33
schema: 1
44
scm: github.com/pubnub/python
55
sdks:
@@ -18,7 +18,7 @@ sdks:
1818
distributions:
1919
- distribution-type: library
2020
distribution-repository: package
21-
package-name: pubnub-6.3.2
21+
package-name: pubnub-6.3.3
2222
location: https://pypi.org/project/pubnub/
2323
supported-platforms:
2424
supported-operating-systems:
@@ -97,8 +97,8 @@ sdks:
9797
-
9898
distribution-type: library
9999
distribution-repository: git release
100-
package-name: pubnub-6.3.2
101-
location: https://github.com/pubnub/python/releases/download/v6.3.2/pubnub-6.3.2.tar.gz
100+
package-name: pubnub-6.3.3
101+
location: https://github.com/pubnub/python/releases/download/v6.3.3/pubnub-6.3.3.tar.gz
102102
supported-platforms:
103103
supported-operating-systems:
104104
Linux:
@@ -169,6 +169,13 @@ sdks:
169169
license-url: https://github.com/aio-libs/aiohttp/blob/master/LICENSE.txt
170170
is-required: Required
171171
changelog:
172+
- date: 2022-05-23
173+
version: v6.3.3
174+
changes:
175+
- type: bug
176+
text: "Error was caused when using random initialization vector. Request path was encrypted two times, once to prepare signage and second one when sending the request."
177+
- type: bug
178+
text: "Fixed exception while receiving empty 'message' field in FileMessageResult"
172179
- date: 2022-05-16
173180
version: v6.3.2
174181
changes:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v6.3.3
2+
May 23 2022
3+
4+
#### Fixed
5+
- Error was caused when using random initialization vector. Request path was encrypted two times, once to prepare signage and second one when sending the request.
6+
- Fixed exception while receiving empty 'message' field in FileMessageResult
7+
18
## v6.3.2
29
May 16 2022
310

pubnub/endpoints/endpoint.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class Endpoint(object):
2424
SERVER_RESPONSE_BAD_REQUEST = 400
2525

2626
__metaclass__ = ABCMeta
27+
_path = None
2728

2829
def __init__(self, pubnub):
2930
self.pubnub = pubnub
@@ -110,12 +111,17 @@ def non_json_response(self):
110111
def encoded_params(self):
111112
return {}
112113

114+
def get_path(self):
115+
if not self._path:
116+
self._path = self.build_path()
117+
return self._path
118+
113119
def options(self):
114120
data = self.build_data()
115121
if data and self.__compress_request():
116122
data = zlib.compress(data.encode('utf-8'), level=2)
117123
return RequestOptions(
118-
path=self.build_path(),
124+
path=self.get_path(),
119125
params_callback=self.build_params_callback(),
120126
method=self.http_method(),
121127
request_timeout=self.request_timeout(),

pubnub/pubnub_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
class PubNubCore:
6767
"""A base class for PubNub Python API implementations"""
68-
SDK_VERSION = "6.3.2"
68+
SDK_VERSION = "6.3.3"
6969
SDK_NAME = "PubNub-Python"
7070

7171
TIMESTAMP_DIVIDER = 1000

pubnub/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def datetime_now():
166166
def sign_request(endpoint, pn, custom_params, method, body):
167167
custom_params['timestamp'] = str(pn.timestamp())
168168

169-
request_url = endpoint.build_path()
169+
request_url = endpoint.get_path()
170170

171171
encoded_query_string = prepare_pam_arguments(custom_params)
172172

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='pubnub',
5-
version='6.3.2',
5+
version='6.3.3',
66
description='PubNub Real-time push service in the cloud',
77
author='PubNub',
88
author_email='[email protected]',

0 commit comments

Comments
 (0)