Skip to content

Commit 8bca7db

Browse files
author
Liang Suilong
committed
crypt-r replaces crypt stdlib, support python-3.13
1 parent fb108f9 commit 8bca7db

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

conf/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ tzdata
2424
websockify==0.12.0
2525
whitenoise==6.9.0
2626
zipp==3.21.0
27+
crypt-r==3.13.1

instances/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import crypt
1+
import crypt_r
22
import json
33
import os
44
import re
@@ -476,7 +476,7 @@ def set_root_pass(request, pk):
476476
if request.method == "POST":
477477
passwd = request.POST.get("passwd", None)
478478
if passwd:
479-
passwd_hash = crypt.crypt(passwd, "$6$kgPoiREy")
479+
passwd_hash = crypt_r.crypt(passwd, "$6$kgPoiREy")
480480
data = {"action": "password", "passwd": passwd_hash, "vname": instance.name}
481481

482482
if instance.proxy.get_status() == 5:

0 commit comments

Comments
 (0)