Skip to content

Commit

Permalink
fix(dns): Fixed base64 encode on python3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mordred committed May 28, 2020
1 parent 7b10f46 commit 0003171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion certbot_plugin_websupport/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _send_request(self, method, path, data=None):
signature = hmac.new(self.api_secret.encode('utf-8'), canonical_request.encode('utf-8'), hashlib.sha1).hexdigest()

headers = {
"Authorization": "Basic %s" % (base64.b64encode("%s:%s" % (self.api_key, signature))),
"Authorization": "Basic {0}".format(base64.b64encode("{0}:{1}".format(self.api_key, signature).encode('utf-8')).decode('utf-8')),
"Content-Type": "application/json",
"Accept": "application/json",
"Date": datetime.fromtimestamp(timestamp).isoformat()
Expand Down

0 comments on commit 0003171

Please sign in to comment.