From 8bca7db917fcb16c91ed4e7c93adb15beb6e14bd Mon Sep 17 00:00:00 2001 From: Liang Suilong Date: Sun, 30 Mar 2025 10:33:51 +0800 Subject: [PATCH] crypt-r replaces crypt stdlib, support python-3.13 --- conf/requirements.txt | 1 + instances/views.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/requirements.txt b/conf/requirements.txt index d423749..bab331c 100644 --- a/conf/requirements.txt +++ b/conf/requirements.txt @@ -24,3 +24,4 @@ tzdata websockify==0.12.0 whitenoise==6.9.0 zipp==3.21.0 +crypt-r==3.13.1 diff --git a/instances/views.py b/instances/views.py index 22e34e8..54b73af 100755 --- a/instances/views.py +++ b/instances/views.py @@ -1,4 +1,4 @@ -import crypt +import crypt_r import json import os import re @@ -476,7 +476,7 @@ def set_root_pass(request, pk): if request.method == "POST": passwd = request.POST.get("passwd", None) if passwd: - passwd_hash = crypt.crypt(passwd, "$6$kgPoiREy") + passwd_hash = crypt_r.crypt(passwd, "$6$kgPoiREy") data = {"action": "password", "passwd": passwd_hash, "vname": instance.name} if instance.proxy.get_status() == 5: