Skip to content

Conversation

@LiHua000
Copy link
Contributor

cherry-pick a serires of commits of vault

task:https://pms.uniontech.com/task-view-383469.html

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @LiHua000, your pull request is larger than the review limit of 150000 diff characters

@github-actions
Copy link

  • 检测到敏感词export变动
详情
    {
    "export": {
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/operatorcenter.cpp": {
            "b": [
                "        int ret = PasswordManager::exportMasterKey(containerPath.toUtf8().constData(),",
                "    int ret = PasswordManager::exportMasterKeyByKeyslot(containerPath.toUtf8().constData(),"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/passwordmanager.cpp": {
            "b": [
                "int PasswordManager::exportMasterKey(const char *path,",
                "    CHECK_ERROR(ret < 0, QString(\"Failed to export master key, error code: %1\").arg(ret));",
                "int PasswordManager::exportMasterKeyByKeyslot(const char *path,",
                "    CHECK_ERROR(ret < 0, QString(\"Failed to export master key from keyslot %1, error code: %2\").arg(keyslot).arg(ret));"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/passwordmanager.h": {
            "b": [
                "    static int exportMasterKey(const char *path,",
                "    static int exportMasterKeyByKeyslot(const char *path,"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/fileencrypthandle.cpp": {
            "b": [
                "            ret = PasswordManager::exportMasterKey(containerPath.toUtf8().constData(),",
                "                fmWarning() << \"Vault: Failed to export master key\";"
            ]
        }
    }
}

@github-actions
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/plugins/filemanager/dfmplugin-vault/views/unlockview/retrievepasswordview.cpp": [
        {
            "line": "const QString PolicyKitRetrievePasswordActionId = \"com.deepin.filemanager.vault.VerifyKey.RetrievePassword\";",
            "line_number": 46,
            "rule": "S105",
            "reason": "Entropy+Var naming | 14148000f8"
        }
    ]
}

@github-actions
Copy link

  • 检测到敏感词export变动
详情
    {
    "export": {
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/operatorcenter.cpp": {
            "b": [
                "        int ret = PasswordManager::exportMasterKey(containerPath.toUtf8().constData(),",
                "    int ret = PasswordManager::exportMasterKeyByKeyslot(containerPath.toUtf8().constData(),"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/passwordmanager.cpp": {
            "b": [
                "int PasswordManager::exportMasterKey(const char *path,",
                "    CHECK_ERROR(ret < 0, QString(\"Failed to export master key, error code: %1\").arg(ret));",
                "int PasswordManager::exportMasterKeyByKeyslot(const char *path,",
                "    CHECK_ERROR(ret < 0, QString(\"Failed to export master key from keyslot %1, error code: %2\").arg(keyslot).arg(ret));"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/passwordmanager.h": {
            "b": [
                "    static int exportMasterKey(const char *path,",
                "    static int exportMasterKeyByKeyslot(const char *path,"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/fileencrypthandle.cpp": {
            "b": [
                "            ret = PasswordManager::exportMasterKey(containerPath.toUtf8().constData(),",
                "                fmWarning() << \"Vault: Failed to export master key\";"
            ]
        }
    }
}

@github-actions
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/plugins/filemanager/dfmplugin-vault/views/unlockview/retrievepasswordview.cpp": [
        {
            "line": "const QString PolicyKitRetrievePasswordActionId = \"com.deepin.filemanager.vault.VerifyKey.RetrievePassword\";",
            "line_number": 46,
            "rule": "S105",
            "reason": "Entropy+Var naming | 14148000f8"
        }
    ]
}

@github-actions
Copy link

  • 检测到debian目录文件有变更: debian/dde-file-manager.install

@github-actions
Copy link

  • 敏感词检查失败, 检测到3个文件存在敏感词
详情
{
    "src/plugins/filemanager/dfmplugin-disk-encrypt-entry/events/eventshandler.cpp": [
        {
            "line": "            *pwd = acquirePassphraseByRec(dev, *cancelled);",
            "line_number": 394,
            "rule": "S28",
            "reason": "Suspicious password declaration | c7753508fa"
        },
        {
            "line": "        *pwd = acquirePassphraseByPIN(dev, *cancelled);",
            "line_number": 402,
            "rule": "S28",
            "reason": "Suspicious password declaration | 4cdcd2dd34"
        },
        {
            "line": "        *pwd = acquirePassphraseByTPM(dev, *cancelled);",
            "line_number": 406,
            "rule": "S28",
            "reason": "Suspicious password declaration | 1db15c632e"
        },
        {
            "line": "        *pwd = acquirePassphraseByRec(dev, *cancelled);",
            "line_number": 429,
            "rule": "S28",
            "reason": "Suspicious password declaration | c7753508fa"
        }
    ],
    "src/plugins/filemanager/dfmplugin-vault/views/unlockview/retrievepasswordview.cpp": [
        {
            "line": "const QString PolicyKitRetrievePasswordActionId = \"com.deepin.filemanager.vault.VerifyKey.RetrievePassword\";",
            "line_number": 46,
            "rule": "S105",
            "reason": "Entropy+Var naming | 14148000f8"
        }
    ],
    "src/plugins/common/dfmplugin-fileoperations/fileoperationsevent/fileoperationseventreceiver.cpp": [
        {
            "line": "            key = \"Name\";",
            "line_number": 386,
            "rule": "S106",
            "reason": "Var naming | ff5dbee3ee"
        }
    ]
}

- Add ResetPasswordByOldPasswordView for password reset via old password
- Add ResetPasswordByKeyFileView for password reset via key file
- Add VaultResetPasswordPages to manage reset password dialog
- Integrate reset password option in vault context menu
- Hide password echo button and align labels with input fields horizontally

log: feature

task: https://pms.uniontech.com/task-view-383469.html
Change-Id: I2a97ce21a34b530ccf8ba1cc89702f90cadde6d9
- Add PasswordManager class for LUKS container operations
- Add libcryptsetup dependency in CMakeLists.txt
- Add isNewVaultVersion() method for version detection

log: feature

Task: https://pms.uniontech.com/task-view-383469.html
Change-Id: I88300aedfe6da59f6d01176e93729f14dee24720
- Add MasterKeyManager for master key generation
- Integrate LUKS container in vault creation/unlock
- Add version detection and creation type flag

log: feature

Task: https://pms.uniontech.com/task-view-383469.html
Change-Id: I250d8df7c690f8e77746e9bba66682ddcb8b248d
- Add password reset functionality via old password or recovery key
- Migrate from RSA public key to LUKS recovery key (32-char string)
- Enhance password verification to support both new (LUKS) and old (RSA) vault versions
- Improve vault creation flow with pre-generated recovery keys
- Add recovery key management APIs (set/get/generate)
- Update UI views for password reset and key file saving
- Fix unlock error count retrieval in unlock view

Log: feature

task: https://pms.uniontech.com/task-view-383469.html
Change-Id: I15f11b9707b4fc05bf69a9a70ac1d94d013de13c
…scheme

Add migration interfaces and upgrade UI flow for old vaults, including upgrade prompts, recovery key save dialog, and spinner animations.

log: feature

task: https://pms.uniontech.com/task-view-383469.html
Change-Id: Iff33e10015909131f6916ecd997a5a91636b3e88
Log: as title

task: https://pms.uniontech.com/task-view-384957.html
Change-Id: I52060c33fcf60a7c9a027398a40b8aaffe58c4f0
…word errors

Replace all placeholder text with setAlert() and showAlertMessage() to display
complete error messages when resetting password by key file fails.

log: fix bug

Bug: https://pms.uniontech.com/bug-view-346119.html
Change-Id: I54e8f1abb1e4761f325306157977a9a0f188f755
Only show "Reset Password" menu item for new version vaults (LUKS) in
context menu. Old version vaults (pbkdf2) don't support password reset.\

log: fix bug

Bug: https://pms.uniontech.com/bug-view-346139.html
Change-Id: I0525047f30117132c79e7452e21c210aee9f9b4d
Implement error attempt limit using VaultDBusUtils to share the same
error counter with unlock function. Check attempt count before reset
and decrement on failure, restore on success.

log: fix bug

Bug: https://pms.uniontech.com/bug-view-346049.html
Change-Id: Ibe8b8d58e9e5f4e166a26b6af9a88d2ef36ff996
@github-actions
Copy link

  • 检测到敏感词export变动
详情
    {
    "export": {
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/operatorcenter.cpp": {
            "b": [
                "        int ret = PasswordManager::exportMasterKey(containerPath.toUtf8().constData(),",
                "    int ret = PasswordManager::exportMasterKeyByKeyslot(containerPath.toUtf8().constData(),"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/passwordmanager.cpp": {
            "b": [
                "int PasswordManager::exportMasterKey(const char *path,",
                "    CHECK_ERROR(ret < 0, QString(\"Failed to export master key, error code: %1\").arg(ret));",
                "int PasswordManager::exportMasterKeyByKeyslot(const char *path,",
                "    CHECK_ERROR(ret < 0, QString(\"Failed to export master key from keyslot %1, error code: %2\").arg(keyslot).arg(ret));"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/encryption/passwordmanager.h": {
            "b": [
                "    static int exportMasterKey(const char *path,",
                "    static int exportMasterKeyByKeyslot(const char *path,"
            ]
        },
        "src/plugins/filemanager/dfmplugin-vault/utils/fileencrypthandle.cpp": {
            "b": [
                "            ret = PasswordManager::exportMasterKey(containerPath.toUtf8().constData(),",
                "                fmWarning() << \"Vault: Failed to export master key\";"
            ]
        }
    }
}

@github-actions
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/plugins/filemanager/dfmplugin-vault/views/unlockview/retrievepasswordview.cpp": [
        {
            "line": "const QString PolicyKitRetrievePasswordActionId = \"com.deepin.filemanager.vault.VerifyKey.RetrievePassword\";",
            "line_number": 46,
            "rule": "S105",
            "reason": "Entropy+Var naming | 14148000f8"
        }
    ]
}

@Johnson-zs
Copy link
Contributor

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 4, 2026

This pr force merged! (status: behind)

@deepin-bot deepin-bot bot merged commit 4da6a18 into linuxdeepin:master Jan 4, 2026
15 of 16 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.

3 participants