Skip to content

Commit 273b27d

Browse files
author
Glenn Snyder
committed
fixed use of hard-coded values for the verify parameter being supplied to the requests module calls
1 parent 42e2e81 commit 273b27d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

blackduck/HubRestApi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,11 +1307,11 @@ def upload_scan(self, filename):
13071307
if filename.endswith('.json') or filename.endswith('.jsonld'):
13081308
headers['Content-Type'] = 'application/ld+json'
13091309
with open(filename,"r") as f:
1310-
response = requests.post(url, headers=headers, data=f, verify=False)
1310+
response = requests.post(url, headers=headers, data=f, verify=not self.config['insecure'])
13111311
elif filename.endswith('.bdio'):
13121312
headers['Content-Type'] = 'application/vnd.blackducksoftware.bdio+zip'
13131313
with open(filename,"rb") as f:
1314-
response = requests.post(url, headers=headers, data=f, verify=False)
1314+
response = requests.post(url, headers=headers, data=f, verify=not self.config['insecure'])
13151315
else:
13161316
raise Exception("Unkown file type")
13171317
return response
@@ -1338,7 +1338,7 @@ def download_project_scans(self, project_name,version_name, output_folder=None):
13381338
if not os.path.exists(project_name):
13391339
os.mkdir(project_name)
13401340
pathname = os.path.join(project_name, filename)
1341-
responce = requests.get(url, headers=self.get_headers(), stream=True, verify=False)
1341+
responce = requests.get(url, headers=self.get_headers(), stream=True, verify=not self.config['insecure'])
13421342
with open(pathname, "wb") as f:
13431343
for data in responce.iter_content():
13441344
f.write(data)

blackduck/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
VERSION = (0, 0, 52)
1+
VERSION = (0, 0, 53)
22

33
__version__ = '.'.join(map(str, VERSION))

0 commit comments

Comments
 (0)