Projet

Général

Profil

0001-api_particulier-increase-api-key-length-to-1024-char.patch

Thomas Noël, 28 octobre 2022 12:01

Télécharger (1,89 ko)

Voir les différences:

Subject: [PATCH] api_particulier: increase api key length to 1024 chars
 (#70814)

 .../migrations/0006_api_key_length_1024.py     | 18 ++++++++++++++++++
 passerelle/apps/api_particulier/models.py      |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 passerelle/apps/api_particulier/migrations/0006_api_key_length_1024.py
passerelle/apps/api_particulier/migrations/0006_api_key_length_1024.py
1
# Generated by Django 2.2.26 on 2022-10-28 09:59
2

  
3
from django.db import migrations, models
4

  
5

  
6
class Migration(migrations.Migration):
7

  
8
    dependencies = [
9
        ('api_particulier', '0005_auto_20210610_1508'),
10
    ]
11

  
12
    operations = [
13
        migrations.AlterField(
14
            model_name='apiparticulier',
15
            name='api_key',
16
            field=models.CharField(blank=True, default='', max_length=1024, verbose_name='API key'),
17
        ),
18
    ]
passerelle/apps/api_particulier/models.py
63 63
        choices=[(key, platform['label']) for key, platform in PLATFORMS.items()],
64 64
    )
65 65

  
66
    api_key = models.CharField(max_length=256, default='', blank=True, verbose_name=_('API key'))
66
    api_key = models.CharField(max_length=1024, default='', blank=True, verbose_name=_('API key'))
67 67

  
68 68
    log_requests_errors = False
69 69

  
70
-