Update update_secret database field length for salted hash
This commit is contained in:
parent
9d8a50e92f
commit
5e7e7a933f
@ -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"),
|
||||||
|
),
|
||||||
|
]
|
@ -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"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user