From ae536ee70d5afe3afa5378476cdcec2e9ff29a60 Mon Sep 17 00:00:00 2001 From: ibrokemypie Date: Mon, 5 Jun 2017 09:44:07 +1000 Subject: [PATCH] [modules/github] Use header for token Doesnt allow sniffers to get the access token from url. Closes #104 --- bumblebee/modules/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/github.py b/bumblebee/modules/github.py index 187d266..35f5725 100644 --- a/bumblebee/modules/github.py +++ b/bumblebee/modules/github.py @@ -44,7 +44,7 @@ class Module(bumblebee.engine.Module): self._count = 0 return - notifications = requests.get("https://api.github.com/notifications?access_token={}".format(token)).text + notifications = requests.get("https://api.github.com/notifications", headers={"Authorization":"token "+format(token)}).text unread = 0 for notification in json.loads(notifications): if "unread" in notification and notification["unread"] == True: