From f99a7d4a31346780cc8fc84604d2d661bb74fc77 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Apr 28 2020 12:42:59 +0000 Subject: providers/openid: secret should be stored as a string The secret coming from oidutil was being written as bytes, which led to breakages when trying to do OpenID authentication, due to everything else expecting strings. Store in the database as strings. Signed-off-by: Neal Gompa --- diff --git a/ipsilon/providers/openid/store.py b/ipsilon/providers/openid/store.py index bba6792..3b36e25 100644 --- a/ipsilon/providers/openid/store.py +++ b/ipsilon/providers/openid/store.py @@ -18,7 +18,7 @@ class OpenIDStore(Store, OpenIDStoreInterface): def storeAssociation(self, server_url, association): iden = '%s-%s' % (server_url, association.handle) - datum = {'secret': oidutil.toBase64(association.secret), + datum = {'secret': oidutil.toBase64(association.secret).decode('utf-8'), 'issued': str(association.issued), 'lifetime': str(association.lifetime), 'assoc_type': association.assoc_type}