Skip to content

Commit 318a8ac

Browse files
authored
Merge pull request #172 from demonpig/fix-logout-without-auth-header
Fix: Don't request /web_api/logout without X-chkp-sid
2 parents b349258 + 80ddaf3 commit 318a8ac

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)