From b50ac96605a0fc97eac0f8e930a0d104327d1596 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 2 Jun 2021 20:20:07 +0200 Subject: [PATCH] providers/oauth2: remove size limit on Access code nonce Signed-off-by: Jens Langhammer --- .../0013_alter_authorizationcode_nonce.py | 18 ++++++++++++++++++ authentik/providers/oauth2/models.py | 4 +--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 authentik/providers/oauth2/migrations/0013_alter_authorizationcode_nonce.py diff --git a/authentik/providers/oauth2/migrations/0013_alter_authorizationcode_nonce.py b/authentik/providers/oauth2/migrations/0013_alter_authorizationcode_nonce.py new file mode 100644 index 000000000..8a9b5886b --- /dev/null +++ b/authentik/providers/oauth2/migrations/0013_alter_authorizationcode_nonce.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.3 on 2021-06-02 18:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_providers_oauth2", "0012_oauth2provider_access_code_validity"), + ] + + operations = [ + migrations.AlterField( + model_name="authorizationcode", + name="nonce", + field=models.TextField(blank=True, default="", verbose_name="Nonce"), + ), + ] diff --git a/authentik/providers/oauth2/models.py b/authentik/providers/oauth2/models.py index fc87a1fb8..30f84cf5e 100644 --- a/authentik/providers/oauth2/models.py +++ b/authentik/providers/oauth2/models.py @@ -337,9 +337,7 @@ class AuthorizationCode(ExpiringModel, BaseGrantModel): """OAuth2 Authorization Code""" code = models.CharField(max_length=255, unique=True, verbose_name=_("Code")) - nonce = models.CharField( - max_length=255, blank=True, default="", verbose_name=_("Nonce") - ) + nonce = models.TextField(blank=True, default="", verbose_name=_("Nonce")) is_open_id = models.BooleanField( default=False, verbose_name=_("Is Authentication?") )