]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: v2.13.0 RC1: increase field max lengths to accommodate larger tokens (#7916)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Mon, 14 Oct 2024 14:56:47 +0000 (07:56 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2024 14:56:47 +0000 (07:56 -0700)
src/paperless_mail/migrations/0027_mailaccount_expiration_mailaccount_account_type_and_more.py
src/paperless_mail/models.py

index a39455b0f65a88d736904e105b975fef2f82435c..3fb1e6af25c9bf9be4b9a4424178593f7a77538b 100644 (file)
@@ -10,6 +10,11 @@ class Migration(migrations.Migration):
     ]
 
     operations = [
+        migrations.AlterField(
+            model_name="mailaccount",
+            name="password",
+            field=models.CharField(max_length=3072, verbose_name="password"),
+        ),
         migrations.AddField(
             model_name="mailaccount",
             name="expiration",
@@ -35,7 +40,7 @@ class Migration(migrations.Migration):
             field=models.CharField(
                 blank=True,
                 help_text="The refresh token to use for token authentication e.g. with oauth2.",
-                max_length=2048,
+                max_length=3072,
                 null=True,
                 verbose_name="refresh token",
             ),
index 15f7bef3560793c24f52ee5adcb45005ac34cf94..6ba00151dc4a205a91f78ac79c2ce151c60c3cd5 100644 (file)
@@ -42,7 +42,7 @@ class MailAccount(document_models.ModelWithOwner):
 
     username = models.CharField(_("username"), max_length=256)
 
-    password = models.CharField(_("password"), max_length=2048)
+    password = models.CharField(_("password"), max_length=3072)
 
     is_token = models.BooleanField(_("Is token authentication"), default=False)
 
@@ -64,7 +64,7 @@ class MailAccount(document_models.ModelWithOwner):
 
     refresh_token = models.CharField(
         _("refresh token"),
-        max_length=2048,
+        max_length=3072,
         blank=True,
         null=True,
         help_text=_(