bump dependency versions, fix tests and deprecation warnings
This commit is contained in:
parent
68170f7576
commit
8ebb5cad6a
5 changed files with 27 additions and 25 deletions
|
@ -1,7 +1,7 @@
|
|||
from django.utils.html import format_html
|
||||
from django.contrib import admin
|
||||
from django import forms
|
||||
from django.forms.util import flatatt
|
||||
from django.forms.utils import flatatt
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from .models import (
|
||||
|
|
|
@ -533,7 +533,10 @@ class SshPublicKeyManager(models.Manager):
|
|||
raise ValueError('invalid SSH public key')
|
||||
data = parts[1]
|
||||
comment = len(parts) == 3 and parts[2] or ""
|
||||
keybytes = base64.b64decode(data)
|
||||
try:
|
||||
keybytes = base64.b64decode(data)
|
||||
except TypeError:
|
||||
raise ValueError('invalid SSH public key')
|
||||
parts = keybytes.split(b'\x00' * 3)
|
||||
alglength = six.byte2int(parts[1])
|
||||
algname = parts[1][1:1+alglength]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue