Skip to content

Commit

Permalink
Ignore openid TypeURIMismatch errors
Browse files Browse the repository at this point in the history
The authentication still succeeds and according to upstream it's benign:
openid/python-openid#23
  • Loading branch information
msimacek committed May 29, 2015
1 parent fde601a commit ebc9daf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions koschei/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# Author: Michael Simacek <msimacek@redhat.com>

import logging
import flask
import functools
from flask.ext.openid import OpenID
Expand All @@ -27,6 +28,11 @@
provider = config['openid']['openid_provider']
openid = OpenID(app, config['openid']['openid_store'], safe_roots=[])

class TypeURIMismatchFilter(logging.Filter):
def filter(self, record):
return 'TypeURIMismatch' not in record.getMessage()

logging.getLogger().addFilter(TypeURIMismatchFilter())

def username_to_openid(name):
return "http://{}.{}/".format(name, provider)
Expand Down

0 comments on commit ebc9daf

Please sign in to comment.