Skip to content

DELIA-70697: Ignore System App to change PowerState request if SYSTEM_SLEEP_REQUEST_KEY not configured#208

Merged
apatel859 merged 1 commit into
6.6_p1vfrom
topic/DELIA-70697
Jun 25, 2026
Merged

DELIA-70697: Ignore System App to change PowerState request if SYSTEM_SLEEP_REQUEST_KEY not configured#208
apatel859 merged 1 commit into
6.6_p1vfrom
topic/DELIA-70697

Conversation

@yuvaramachandran-gurusamy

Copy link
Copy Markdown
Contributor

DELIA-70697: Ignore System App to change PowerState request if SYSTEM_SLEEP_REQUEST_KEY not configured

Signed-off-by: Yuvaramachandran Gurusamy yuvaramachandran_gurusamy@comcast.com

…_SLEEP_REQUEST_KEY not configured

Signed-off-by: Yuvaramachandran Gurusamy <yuvaramachandran_gurusamy@comcast.com>
Copilot AI review requested due to automatic review settings June 23, 2026 18:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the platform DIAL “system” application handling so that power-state actions (sleep, togglepower) are rejected when SYSTEM_SLEEP_REQUEST_KEY is not configured, preventing unprotected power-state changes.

Changes:

  • Treat missing SYSTEM_SLEEP_REQUEST_KEY as a failure condition for system?action=sleep.
  • Treat missing SYSTEM_SLEEP_REQUEST_KEY as a failure condition for system?action=togglepower.
  • Expand logging for key mismatch / missing configuration cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/plat/rtdial.cpp
printf("RTDIAL: system app request to change device to sleep mode, key comparison failed: user provided '%s'\n", parsed_query["key"].c_str());
if ((NULL == system_key) || (parsed_query["key"] != system_key)) {
if (system_key) {
printf("RTDIAL: system app request to change device to sleep mode, key comparison failed: user provided '%s', expected '%s'\n", parsed_query["key"].c_str(), system_key);
Comment thread server/plat/rtdial.cpp
else {
printf("RTDIAL: system app request to change device to sleep mode, SYSTEM_SLEEP_REQUEST_KEY not set\n");
}
return GDIAL_APP_ERROR_INTERNAL;
Comment thread server/plat/rtdial.cpp
printf("RTDIAL: system app request to toggle the power state, key comparison failed: user provided '%s'\n", parsed_query["key"].c_str());
if ((NULL == system_key) || (parsed_query["key"] != system_key)) {
if (system_key) {
printf("RTDIAL: system app request to toggle the power state, key comparison failed: user provided '%s', expected '%s'\n", parsed_query["key"].c_str(), system_key);
Comment thread server/plat/rtdial.cpp
else {
printf("RTDIAL: system app request to toggle the power state, SYSTEM_SLEEP_REQUEST_KEY not set\n");
}
return GDIAL_APP_ERROR_INTERNAL;
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@apatel859 apatel859 merged commit 639f0bc into 6.6_p1v Jun 25, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants