This fixes OpenID specification compliance, since the main
OpenID endpoint URL needs to serve a non-error result on
query, and the current code would error out.
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-by: Rob Crittenden <rcritten@redhat.com>
try:
# generate a new id or get current one
self.trans = Transaction('openid', **kwargs)
- if self.trans.cookie.value != self.trans.provider:
+ if (self.trans.cookie and
+ self.trans.cookie.value != self.trans.provider):
self.debug('Invalid transaction, %s != %s' % (
self.trans.cookie.value, self.trans.provider))
except Exception, e: # pylint: disable=broad-except