Skip to content

Commit

Permalink
hide api-key from debug file (#61)
Browse files Browse the repository at this point in the history
* Add sg file

* Revert "Add sg file"

This reverts commit 726298c.

* hide api-key from debug file
  • Loading branch information
chkp-edenbr authored Feb 6, 2025
1 parent 2f471a7 commit 24be1e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cpapi/mgmt_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,10 @@ def api_call(self, command, payload=None, sid=None, wait_for_task=True, timeout=
# would not appear as plaintext in the debug file.
if command == "login":
json_data = compatible_loads(_data)
json_data["password"] = "****"
if "password" in json_data:
json_data["password"] = "****"
if "api-key" in json_data:
json_data["api-key"] = "****"
_data = json.dumps(json_data)

if self.debug_file:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="cp-mgmt-api-sdk",
version="1.8.0",
version="1.9.0",
author="API team",
author_email="[email protected]",
license='Apache 2.0',
Expand Down

0 comments on commit 24be1e8

Please sign in to comment.