From 76c54dc824496ccd82b58299fc1d76d8c73b7409 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 30 Jun 2020 10:07:57 +0200 Subject: [PATCH 1/3] idp_oidc: change type of OIDCCode.redirect_uri (#44589) To accept URL of any length. --- .../migrations/0013_auto_20200630_1007.py | 19 +++++++++++++++++++ src/authentic2_idp_oidc/models.py | 5 +++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/authentic2_idp_oidc/migrations/0013_auto_20200630_1007.py diff --git a/src/authentic2_idp_oidc/migrations/0013_auto_20200630_1007.py b/src/authentic2_idp_oidc/migrations/0013_auto_20200630_1007.py new file mode 100644 index 00000000..ef588644 --- /dev/null +++ b/src/authentic2_idp_oidc/migrations/0013_auto_20200630_1007.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.13 on 2020-06-30 08:07 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('authentic2_idp_oidc', '0012_auto_20200122_2258'), + ] + + operations = [ + migrations.AlterField( + model_name='oidccode', + name='redirect_uri', + field=models.TextField(validators=[django.core.validators.URLValidator()], verbose_name='redirect URI'), + ), + ] diff --git a/src/authentic2_idp_oidc/models.py b/src/authentic2_idp_oidc/models.py index cf2530e8..0f20f77a 100644 --- a/src/authentic2_idp_oidc/models.py +++ b/src/authentic2_idp_oidc/models.py @@ -299,8 +299,9 @@ class OIDCCode(models.Model): nonce = models.TextField( null=True, verbose_name=_('nonce')) - redirect_uri = models.URLField( - verbose_name=_('redirect URI')) + redirect_uri = models.TextField( + verbose_name=_('redirect URI'), + validators=[URLValidator()]) session_key = models.CharField( verbose_name=_('session key'), max_length=128) -- 2.26.2