1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

crypt-r replaces crypt stdlib, support python-3.13

This commit is contained in:
Liang Suilong 2025-03-30 10:33:51 +08:00
parent fb108f9ac9
commit 8bca7db917
2 changed files with 3 additions and 2 deletions

View file

@ -24,3 +24,4 @@ tzdata
websockify==0.12.0
whitenoise==6.9.0
zipp==3.21.0
crypt-r==3.13.1

View file

@ -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: