Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ language: python
python:
- "2.7.6"
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ coveralls==1.1
ipdb==0.9.3
ipython==4.1.2
pdbpp==0.8.3
pytest>=3.2.0
pytest>=3.2.0,<4.0.0
pytest-flask==0.10.0
pytest-mock>=1.6.3
pytest-cov==2.5.1
Expand Down
4 changes: 2 additions & 2 deletions slackeventsapi/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def verify_signature(self, timestamp, signature):
# It's recommended to use Python 2.7.7+
# noqa See https://docs.python.org/2/whatsnew/2.7.html#pep-466-network-security-enhancements-for-python-2-7
if hasattr(hmac, "compare_digest"):
req = str.encode('v0:' + str(timestamp) + ':') + request.data
req = str.encode('v0:' + str(timestamp) + ':') + request.get_data()
request_hash = 'v0=' + hmac.new(
str.encode(self.signing_secret),
req, hashlib.sha256
Expand All @@ -65,7 +65,7 @@ def verify_signature(self, timestamp, signature):
return hmac.compare_digest(request_hash, signature)
else:
# So, we'll compare the signatures explicitly
req = str.encode('v0:' + str(timestamp) + ':') + request.data
req = str.encode('v0:' + str(timestamp) + ':') + request.get_data()
request_hash = 'v0=' + hmac.new(
str.encode(self.signing_secret),
req, hashlib.sha256
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; for quality analysis, use `tox -e flake8` or just `flake8 slackeventsapi`
; to build the docs, use `tox -e docs`
envlist=
py{276,27,33,34,35,36},
py{276,27,34,35,36},
flake8,
docs

Expand Down