BUG555: Chacha20アルゴリズムで暗号化。注:このコミットは全員の開発環境に存在する必要があります。その後、/#/domainページにアクセスし、暗号化されていないアカウントの「編集」をクリックして直接保存し、暗号化されていないアカウントを暗号化します。
This commit is contained in:
@@ -2,6 +2,7 @@ from pydantic import BaseModel
|
||||
from datetime import datetime
|
||||
import typing as t
|
||||
|
||||
from app.core.security import chacha20Decrypt, chacha20Encrypt
|
||||
|
||||
class Base(BaseModel):
|
||||
create_time: datetime
|
||||
@@ -119,6 +120,10 @@ class DomainBase(BaseModel):
|
||||
kintoneuser: str
|
||||
kintonepwd: str
|
||||
|
||||
def encrypt_kintonepwd(self):
|
||||
encrypted_pwd = chacha20Encrypt(self.kintonepwd)
|
||||
self.kintonepwd = encrypted_pwd
|
||||
|
||||
class Domain(Base):
|
||||
id: int
|
||||
tenantid: str
|
||||
|
||||
Reference in New Issue
Block a user