Skip to content

Commit 80ddaf3

Browse files
committed
Don't request /web_api/logout without X-chkp-sid
1 parent 10d8687 commit 80ddaf3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/httpapi/checkpoint.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ def login(self, username, password):
8787
self.connection._session_uid = response_data["uid"]
8888

8989
def logout(self):
90+
if any([
91+
not self.connection._auth,
92+
(self.connection._auth and "X-chkp-sid" not in self.connection._auth)
93+
]):
94+
return
9095
url = "/web_api/logout"
9196

9297
response, dummy = self.send_request(url, None)

0 commit comments

Comments
 (0)