Skip to content

Commit

Permalink
fix hmac for python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobstr committed Oct 14, 2020
1 parent 0e37ac7 commit f30bdc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -49,7 +49,7 @@ jobs:
- echo "$KUBECONFIG" | base64 -d > ~/.kube/config
- export KUBECONFIG=~/.kube/config
- cd deploy/env/ci
- kustomize edit set image koobz/crusher-worker=koobz/crusher-worker:$WORKER_IMAGE
- kustomize edit set image koobz/crusher-server=koobz/crusher-server:$SERVER_IMAGE
- kustomize edit set image "koobz/crusher-worker=koobz/crusher-worker:${WORKER_IMAGE}"
- kustomize edit set image "koobz/crusher-server=koobz/crusher-server:${SERVER_IMAGE}"
- kustomize build . | grep image
- kustomize build . | kubectl apply --context crusher -n crusher --token $KUBECTL_TOKEN -f -
2 changes: 1 addition & 1 deletion server/app.py
Expand Up @@ -620,7 +620,7 @@ def verify_slack_request(slack_signature=None, slack_request_timestamp=None, req
)

''' Create a new HMAC "signature", and return the string presentation. '''
my_signature = 'v0=' + hmac.new(SLACK_SIGNING_SECRET, basestring, hashlib.sha256).hexdigest()
my_signature = 'v0=' + hmac.new(bytes(SLACK_SIGNING_SECRET), basestring, hashlib.sha256).hexdigest()

''' Compare the the Slack provided signature to ours.
If they are equal, the request should be verified successfully.
Expand Down

0 comments on commit f30bdc0

Please sign in to comment.