Update update_secret database field length for salted hash

This commit is contained in:
Florian Eitel 2023-03-07 17:47:59 +01:00
parent 9d8a50e92f
commit 5e7e7a933f
Signed by: flo
GPG Key ID: 9987EAFEF6F686BB
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 4.1.5 on 2023-03-07 16:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("main", "0012_auto_20191230_1729"),
]
operations = [
migrations.AlterField(
model_name="host",
name="update_secret",
field=models.CharField(max_length=128, verbose_name="update secret"),
),
]

View File

@ -165,7 +165,7 @@ class Host(models.Model):
domain = models.ForeignKey(Domain, on_delete=models.CASCADE, verbose_name=_("domain")) domain = models.ForeignKey(Domain, on_delete=models.CASCADE, verbose_name=_("domain"))
update_secret = models.CharField( update_secret = models.CharField(
_("update secret"), _("update secret"),
max_length=64, # secret gets hashed (on save) to salted sha1, 58 bytes str len max_length=128, # secret gets hashed (on save) to salted sha1, "sha1" + "$" + 22 chars salt + "$" + 40 chars sha1 = 68 chars
) )
comment = models.CharField( comment = models.CharField(
_("comment"), _("comment"),