about summary refs log tree commit diff
diff options
context:
space:
mode:
authormob41 <puihuenlaw@gmail.com>2017-06-14T02·30+0800
committerMatthew Garrett <mjg59-github@srcf.ucam.org>2017-06-14T02·30-0700
commit2e2c8ef1a15175cf311f757a52e7c561f834f68b (patch)
tree8994ac9ad7ba39509a53994a364b927d38067e1a
parentf7e30344c5748e37924c8a4f28522c2bc99a52ee (diff)
[Critical] Fixes invalid byte string (b) for padding (#97, #107) (#108)
* Fixes invalid byte string (b) for padding (#97, #107)

* Change version to 0.5
-rw-r--r--broadlink/__init__.py2
-rw-r--r--setup.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py
index e757f90005a8..1b65345b47b1 100644
--- a/broadlink/__init__.py
+++ b/broadlink/__init__.py
@@ -248,7 +248,7 @@ class device:
     # pad the payload for AES encryption
     if len(payload)>0:
       numpad=(len(payload)//16+1)*16
-      payload=payload.ljust(numpad,"\x00")
+      payload=payload.ljust(numpad,b"\x00")
 
     checksum = 0xbeaf
     for i in range(len(payload)):
diff --git a/setup.py b/setup.py
index ed627fe13b73..1971c92b2f0d 100644
--- a/setup.py
+++ b/setup.py
@@ -12,11 +12,11 @@ try:
 except ImportError as e:
     dynamic_requires = ['pycrypto==2.6.1']
 
-version = 0.3
+version = 0.5
 
 setup(
     name='broadlink',
-    version=0.4,
+    version=0.5,
     author='Matthew Garrett',
     author_email='mjg59@srcf.ucam.org',
     url='http://github.com/mjg59/python-broadlink',