-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Ignore foreground event for SecureDesktopNVDAObject #14105
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 tasks
feerrenrut
reviewed
Sep 5, 2022
feerrenrut
approved these changes
Sep 6, 2022
6 tasks
seanbudd
added a commit
that referenced
this pull request
Sep 9, 2022
Follow up to #14105 Fixes issue described in #14111 (comment) Summary of the issue: SecureDesktopNVDAObject is an API end point used to indicate to the user and to API consumers (including NVDA remote), that the user has switched to a secure desktop. This is triggered when Windows notification EVENT_SYSTEM_DESKTOPSWITCH notifies that the desktop has changed. The switch is handled via a gainFocus event. The gainFocus event causes the user instance of NVDA to enter sleep mode as the secure mode NVDA instance starts on the secure screen. Information from SecureDesktopNVDAObject should not be accessible to the user, as it is backed by a valid MSAA desktop running on a secure profile, that NVDA can report information from. This should generally be handled by NVDA entering sleep mode. In #14105, SecureDesktopNVDAObject became based on NVDAObject to improve security for the object, by breaking it's connection to a valid window. This was to decrease the theoretical risk of information leakage. However, it was discovered that NVDA core event tracking and API consumers rely on SecureDesktopNVDAObject inheriting from Window (a parent class of Desktop). As such, SecureDesktopNVDAObject must remain a Desktop subclass to retain backwards compatibility. However we can prevent neighbouring objects from being accessed. Description of user facing changes Fixes bug in NVDA alpha with handling SecureDesktopNVDAObject. Fixes API breakage. Description of development approach Reverts the change in #14105, making SecureDesktopNVDAObject inherit from Desktop. Prevents neighbouring objects to SecureDesktopNVDAObject from being accessed by overriding relevant methods.
This was referenced Sep 13, 2022
seanbudd
added a commit
that referenced
this pull request
Sep 15, 2022
Summary of the issue: NVDA 2022.2 would cancel speech when handling the foreground event for entering a secure desktop. The security patch for 2022.2.1 broke how the foreground event was handled, and subsequently #14105 opted to avoid the foreground event entirely. This results in NVDA not correctly cancelling speech when entering a secure desktop. Description of user facing changes Speech is cancelled when entering a secure desktop Description of development approach Cancel speech just before enter sleep mode, when SecureDesktopNVDAObject handles it's gain focus event.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Supersedes #14098
Fixes #14094
Summary of the issue:
SecureDesktopNVDAObject
needs to be whitelisted on the lock screen.This is an
NVDAObject
used to notify the user and API consumers that NVDA has entered a secure desktop.Description of user facing changes
Fixes NVDA remote bug described in #14094.
"Secure Desktop" is now consistently announced again when entering a secure desktop.
Description of development approach
Add
SecureDesktopNVDAObject
to the whitelist of available objects on the lock screen.Ensures that when setting the foreground event does not occur via
doPreGainFocus
forSecureDesktopNVDAObject
.This is because the foreground event cannot be handled in a secure manner, and is not required for the
SecureDesktopNVDAObject
API.Testing strategy:
Manual testing
Known issues with pull request:
Important note: This change technically results in an add-on API change
SecureDesktopNVDAObject
is no longer a subclass ofDesktop
orWindow
It is unexpected that
SecureDesktopNVDAObject
is used as a generalNVDAObject
:SecureDesktopNVDAObject
.Allowing this object to use
Desktop
orWindow
as a base class creates another vector for information leaks or privilege escalation.Future plans:
Cater to the notification use-case via an extension point rather than the internal gain gocus event.
Change log entries:
Refer to PR diff
Code Review Checklist: