DMTF / Redfish-Service-Validator

The Redfish Service Validator is a Python3 tool for checking conformance of any "device" with a Redfish service interface against Redfish CSDL schema
Other
42 stars 34 forks source link

Seeing Exception in killSession() at end of program #73

Closed jbobzin-insyde closed 7 years ago

jbobzin-insyde commented 7 years ago

In the case that Authentication is Basic, there is no session, and when RedfishServiceValidator line 709 calls killSession() which calls isSessionOld() there is comparison to initialized variable.

maybe this patch?

if rst.currentSession.started: 
    rst.currentSession.killSession()

Or maybe patch the entry of killSession()? Or both?

def killSession(self):
    if self.started:
        if not self.isSessionOld():
            headers = {"X-Auth-Token": self.getSessionKey()}
            headers.update(commonHeader)
            response = requests.delete(str(self.server) + str(self.loc), verify=self.chkCert, headers=headers)
            self.started = False
    return True
tomasg2012 commented 7 years ago

This was patched in as part of an addendum on Friday, I believe it's been merged as of then. It was a bit sudden, so a quick pull should allow you to run Basic.

On Aug 7, 2017 2:06 PM, "jbobzin-insyde" notifications@github.com wrote:

In the case that Authentication is Basic, there is no session, and when RedfishServiceValidator line 709 calls killSession() which calls isSessionOld() there is comparison to initialized variable.

maybe this patch?

if rst.currentSession.started: rst.currentSession.killSession()

Or maybe patch the entry of killSession()? Or both?

def killSession(self): if self.started: if not self.isSessionOld(): headers = {"X-Auth-Token": self.getSessionKey()} headers.update(commonHeader) response = requests.delete(str(self.server) + str(self.loc), verify=self.chkCert, headers=headers) self.started = False return True

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfish-Service-Validator/issues/73, or mute the thread https://github.com/notifications/unsubscribe-auth/AFUEXI5LpI7aRNg2iuw-U0GHB-hMkfWCks5sV2A_gaJpZM4Ov05D .

jbobzin-insyde commented 7 years ago

Did not know you were able to patch outside of the meeting. Sorry, I was on the Thursday version.