Skip to content

Commit

Permalink
Merge pull request #1133 from wklken/ft_replace_pycrypto
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken authored Mar 22, 2024
2 parents 6281b56 + beceb26 commit 9bcd2c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion paas2/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.14.67
2.14.68
3 changes: 2 additions & 1 deletion paas2/login/common/encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def encrypt(plaintext, key="", base64=True):
key = force_bytes(key)
key = hashlib.md5(key).digest()
cipher = AES.new(key, AES.MODE_ECB)
ciphertext = cipher.encrypt(pad(plaintext))
pad_text = pad(plaintext)
ciphertext = cipher.encrypt(pad_text.encode("utf-8"))

# 将密文base64加密
if base64:
Expand Down
3 changes: 3 additions & 0 deletions paas2/release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Release Log
===============================
# 2.14.68
- fix: login encrypt bk_token fail

# 2.14.67
- esb: use cryptography==3.4.8

Expand Down

0 comments on commit 9bcd2c1

Please sign in to comment.