From aebcbb63fd828445368dc770be547ca637beee87 Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 22 Aug 2022 16:10:31 +0300 Subject: [PATCH 1/2] remove duplicate restframework module entry --- webvirtcloud/settings.py.template | 1 - 1 file changed, 1 deletion(-) diff --git a/webvirtcloud/settings.py.template b/webvirtcloud/settings.py.template index bb37597..17156e1 100644 --- a/webvirtcloud/settings.py.template +++ b/webvirtcloud/settings.py.template @@ -22,7 +22,6 @@ INSTALLED_APPS = [ "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", - "rest_framework", "django_bootstrap5", "django_icons", "django_otp", From 33a7e30fc5b201cf70d4dd7c01d8236e4a3e9a23 Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 22 Aug 2022 16:14:22 +0300 Subject: [PATCH 2/2] convert decodestring -> decodebytes for python 3.10 compatibility --- accounts/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/utils.py b/accounts/utils.py index da30c0a..4507a54 100644 --- a/accounts/utils.py +++ b/accounts/utils.py @@ -30,7 +30,7 @@ def validate_ssh_key(key): username = array[2] # must have only valid rsa-ssh key characters ie binascii characters try: - data = base64.decodestring(string) + data = base64.decodebytes(string) except binascii.Error: return False # unpack the contents of data, from data[:4] , property of ssh key .