Skip to content

Commit 3733712

Browse files
authored
Merge pull request #39 from galaxy-genome-annotation/4.2.5
Prevent from displaying login/password in the logs
2 parents 03e9628 + 6b946ff commit 3733712

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Or with the Arrow client:
8585
History
8686
-------
8787

88+
- 4.2.5
89+
- Prevent from displaying login/password in the logs
8890
- 4.2.4
8991
- Remove unused dependency
9092
- 4.2.3

apollo/client.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ def post(self, client_method, data, post_params=None, is_json=True, files=None,
4444
else:
4545
raise Exception("You must add credentials yourself")
4646

47+
# We don't want username+password in the logs
48+
data_log = dict(data)
49+
data_log['username'] = 'XXXXXXXXX'
50+
data_log['password'] = 'XXXXXXXXX'
51+
4752
if autoconvert_to_json:
4853
headers = {
4954
'Content-Type': 'application/json'
@@ -55,8 +60,12 @@ def post(self, client_method, data, post_params=None, is_json=True, files=None,
5560
curl_command = ['curl', url]
5661
for (k, v) in headers.items():
5762
curl_command += ['-H', quote('%s: %s' % (k, v))]
63+
64+
curl_command_log = curl_command + ['-d', quote(json.dumps(data_log))]
65+
5866
curl_command += ['-d', quote(json.dumps(data))]
59-
log.info(' '.join(curl_command))
67+
68+
log.info(' '.join(curl_command_log))
6069

6170
resp = requests.post(url, data=data, headers=headers, verify=self.__verify,
6271
params=post_params, allow_redirects=False,

arrow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.2.4'
1+
__version__ = '4.2.5'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
setup(
1818
name="apollo",
19-
version='4.2.4',
19+
version='4.2.5',
2020
description="Apollo API library",
2121
long_description=readme,
2222
author="Helena Rasche;Anthony Bretaudeau;Nathan Dunn",

0 commit comments

Comments
 (0)