expand mumble certhash to allow for hmac-sha-256

This commit is contained in:
Ariel Rin 2020-10-11 20:11:56 +10:00
parent 137e8a876d
commit a6e60bc23b
3 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.1.2 on 2020-10-11 10:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mumble', '0010_mumbleuser_certhash'),
]
operations = [
migrations.AlterField(
model_name='mumbleuser',
name='pwhash',
field=models.CharField(max_length=90),
),
]

View File

@ -63,7 +63,7 @@ class MumbleManager(models.Manager):
class MumbleUser(AbstractServiceModel):
username = models.CharField(max_length=254, unique=True)
pwhash = models.CharField(max_length=80)
pwhash = models.CharField(max_length=90)
hashfn = models.CharField(max_length=20, default='sha1')
groups = models.TextField(blank=True, null=True)
certhash = models.CharField(

View File

@ -211,4 +211,4 @@ class MumbleManagerTestCase(TestCase):
pwhash = self.manager.gen_pwhash('test')
self.assertEqual(pwhash[:15], '$bcrypt-sha256$')
self.assertEqual(len(pwhash), 75)
self.assertEqual(len(pwhash), 83)