Closed niftylettuce closed 2 years ago
The actual traceback comes from authres. It looks like we're passing a string to it when it should be of type AuthenticationResultProperty or something like that.
The str conversion is in authres, so I think this is an authres issue. I'll close this once I've confirmed that and opened a bug against it.
I'm less convinced now that I've studied this some more. In all the tests we have, self.value is either <class 'NoneType'> or .<class 'authres.core.QuotableValue'>, neither of which could raise that error. The same is true of the tests for authres. I don't see how it's possible to stuff a string into there and get to that point. This will need a test case or some further information.
See https://github.com/ValiMail/authentication-headers/issues/19#issuecomment-1014955652 for closing comment.
You can see the error occurs here in the code:
return '%s.%s=%s' % (self.type, self.name, self.value.quote_if_needed())