Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NoneType' object has no attribute 'name_qualifier' #72

Closed
goetzk opened this issue Aug 16, 2017 · 4 comments
Closed

'NoneType' object has no attribute 'name_qualifier' #72

goetzk opened this issue Aug 16, 2017 · 4 comments

Comments

@goetzk
Copy link
Contributor

goetzk commented Aug 16, 2017

I investigated this error and discovered it was due to being logged in via django admin not through SAML. I went looking and found it had been independently reported, investigated and closed already:
https://bitbucket.org/knaperek/djangosaml2/issues/1/getting-nonetype-object-has-no-attribute

Would it be possible to change the error to include words along the lines of "Have you authenticated via SAML?". It seems the most likely cause of the error condition being hit and would help with debugging a new install.

knaperek added a commit that referenced this issue Aug 16, 2017
@knaperek
Copy link
Collaborator

OK, done. Thanks!

@goetzk
Copy link
Contributor Author

goetzk commented Aug 16, 2017

Thanks again!

I'm really impressed with upstream responsiveness in this project :)

@knaperek
Copy link
Collaborator

Was just trying to catch up before I leave for vacation, don't get used to it too much ;-)

@dino8890
Copy link

Hi @peppelinux, I'd like to reopen this as I'm experiencing the same issue, but the cause is different.

For some unknown reason our users lose the saml_session cookie which leads to this error upon logging out. I'm not sure what causes the cookie not to be sent, but it seems we're not the only ones experiencing this as the user in #275 also reported cookie going AWOL.

Naturally, I can reproduce this error by deleting saml_session cookie and then attempting to log out.

Proposed solution

I don't think messing up the client data should result in application crashes, so at the very least we could raise custom exception instead of AttributeError so that we can catch it and handle it ourselves while allowing the possibility of unknown errors bubbling up. It may not be ideal, but it is more durable design.

Would love to hear opinions on this.

Regards,
Dino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants