Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [safety] string encrypt input. #2061

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

pppanghu77
Copy link
Contributor

1.encrypt dbus pwd input

Log: as title
Bug: https://pms.uniontech.com/bug-view-259823.html

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pppanghu77

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • encryptPasswd函数中,直接使用toBase64可能会导致明文密码被错误地编码为Base64,应该先将密码转换为字节数组再进行Base64编码。
  • decryptPasswd函数中,使用fromBase64直接解码可能会导致错误的密码被解析为明文,应该先将Base64编码的字节数组解析为QString再转换为明文。
  • encryptPasswd函数中的加密逻辑(将明文转换为Base64编码的字节数组)可能不适用于所有场景,应该考虑使用加密插件来处理密码加密。
  • decryptPasswd函数中的解密逻辑(将Base64编码的字节数组解析为QString再转换为明文)可能不适用于所有场景,应该考虑使用加密插件来处理密码解密。

是否建议立即修改:

@pppanghu77
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 74329ae into linuxdeepin:master Jun 28, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants