Skip to content

Commit

Permalink
[M114-LTS] Prevent SessionAbortedDialog dismissal via keyboard accele…
Browse files Browse the repository at this point in the history
…rator

This dialog has no Cancel/Close button, but it can still
be dismissed via keyboard accelerator. This CL fixes the
exploit mentioned in the issue, but extra work might be required
to fix this behavior at dialog framework level.

(cherry picked from commit 7495fc4)

Bug: b:315761861, b:312113018
Change-Id: I15291f74f625a0759403bd73f208455e1e96d8d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5126184
Commit-Queue: Denis Kuznetsov <[email protected]>
Auto-Submit: Denis Kuznetsov <[email protected]>
Cr-Original-Commit-Position: refs/heads/main@{#1239090}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5235001
Commit-Queue: Roger Felipe Zanoni da Silva <[email protected]>
Reviewed-by: Ahmed Fakhry <[email protected]>
Reviewed-by: Victor Gabriel Savu <[email protected]>
Owners-Override: Victor Gabriel Savu <[email protected]>
Cr-Commit-Position: refs/branch-heads/5735@{#1691}
Cr-Branched-From: 2f562e4-refs/heads/main@{#1135570}
  • Loading branch information
Denis Kuznetsov authored and Chromium LUCI CQ committed Feb 9, 2024
1 parent e38543b commit 40e593a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ash/session/session_aborted_dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ SessionAbortedDialog::SessionAbortedDialog() {
IDS_ASH_MULTIPROFILES_SESSION_ABORT_BUTTON_LABEL));
SetAcceptCallback(base::BindOnce(
[]() { Shell::Get()->session_controller()->RequestSignOut(); }));
// Prevent dismissing dialog via keyboard accelerator.
SetCancelCallbackWithClose(
base::BindRepeating([]() -> bool { return false; }));
}

SessionAbortedDialog::~SessionAbortedDialog() = default;
Expand Down

0 comments on commit 40e593a

Please sign in to comment.