Skip to content

Commit 6f257e1

Browse files
committed
Disabled trust for insecure environment
requests doesn't a bunch of weird things, including reading auth info from your ~/.netrc file. Disable that so our authorization header doesn't get stomped.
1 parent 84baee3 commit 6f257e1

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

docs/news/20190912.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disabled requests lib trust for insecure environment

src/mbed_cloud/client/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def __init__(self, config):
3737
"""
3838
self.config = config
3939
self.session = requests.Session()
40+
self.session.trust_env = False
4041
self.session.headers.update(
4142
{
4243
"Authorization": "Bearer %s" % self.config.api_key,

0 commit comments

Comments
 (0)