Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 7cb5656

Browse files
authored
Prevent overwriting Authorization with basic auth (#901)
1 parent 2c3d49c commit 7cb5656

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

influxdb/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ def request(self, url, method='GET', params=None, data=None, stream=False,
336336
_try = 0
337337
while retry:
338338
try:
339-
auth = (self._username, self._password)
339+
if "Authorization" in headers:
340+
auth = (None, None)
341+
else:
342+
auth = (self._username, self._password)
340343
response = self._session.request(
341344
method=method,
342345
url=url,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy