fix(display): validate Wayland socket paths - #1798
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: unbridled-41 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 |
|
Hi @unbridled-41. Thanks for your PR. I'm waiting for a OpenAtom-Linyaps member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reject an empty WAYLAND_DISPLAY before indexing it and require resolved display paths to be Unix sockets rather than merely existing filesystem entries. Add coverage for empty input, files, directories, and real sockets. Signed-off-by: 做着百万梦的鱼 <yangzihao_41@outlook.com>
3cb9250 to
4e6f23f
Compare
Summary
Reject empty Wayland display names and filesystem paths that do not refer to Unix sockets.
Root cause
getWaylandDisplay()indexeddisplay[0]without checking for an empty string. It also treated any existing path as a valid display socket, so regular files and directories could be returned to callers.Changes
WAYLAND_DISPLAYvalue before indexing it.std::filesystem::status().Test plan
git diff --check