fix: remove DSG_APP_ID from notification action#1114
Conversation
When starting a child process, do not inherit the DSG_APP-ID environment variable to prevent direct modification of dde shell configuration by the child process pms: BUG-315007
deepin pr auto review关键摘要:
是否建议立即修改:
|
Reviewer's GuideThe pull request modifies the invocation of notification actions to prevent child processes from inheriting the DSG_APP_ID environment variable. This is achieved by explicitly creating a QProcess, obtaining the system environment, removing the DSG_APP_ID variable, and then setting this modified environment for the process before starting it. Sequence Diagram: Modified Process Invocation in NotificationManagersequenceDiagram
participant NM as NotificationManager
participant QPE as QProcessEnvironment
participant QP as QProcess
NM->>QP: Create QProcess instance (pro)
NM->>QP: pro.setProgram(cmd)
NM->>QP: pro.setArguments(args)
NM->>QPE: QProcessEnvironment::systemEnvironment()
QPE-->>NM: returns systemEnv
NM->>NM: proEnv = systemEnv
NM->>NM: proEnv.remove("DSG_APP_ID")
NM->>QP: pro.setProcessEnvironment(proEnv)
NM->>QP: pro.startDetached()
Class Diagram: Update to NotificationManager::doActionInvoked MethodclassDiagram
class NotificationManager {
+doActionInvoked(const NotifyEntity &entity, const QString &actionId) void
}
note for NotificationManager.doActionInvoked "Method updated to explicitly remove DSG_APP_ID from the environment of child processes started via QProcess. This prevents unintended inheritance and potential modification of dde shell configuration by the child process."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @mhduiy - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
|
/integrate |
|
AutoIntegrationPr Bot |
When starting a child process, do not inherit the DSG_APP-ID environment variable to prevent direct modification of dde shell configuration by the child process
pms: BUG-315007
Summary by Sourcery
Bug Fixes: