Repository navigation
Conversation
_read relied on os.O_NOFOLLOW, which may be missing or a no-op on Windows, so a card replaced with a symlink was still shown. lstat the path first and refuse a link, and keep O_NOFOLLOW on POSIX. The POSIX 0o600 and group/other-bit checks are unchanged. The tests assert those permission bits only on POSIX, where st_mode carries them (Windows often reports 0o666 / 438).
The Windows exception-card symlink fix should ship, so this bumps openadapt-desktop from 0.31.0 to 0.31.1 and records the changelog.
Member
Author
Independent adversarial review: APPROVEFrom: Gemini Independent cross-vendor adversarial review of Findings & fail-closed verification
Generality gate
|
Member
Author
|
Superseded by #2533 ( |
This file contains hidden or 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
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.
Desktop's exception-card reader is supposed to skip a link and, on POSIX, skip a file other users can read. On Windows,
os.O_NOFOLLOWmay be missing or a no-op, sotest_a_linked_card_is_not_readstill saw the card. The answer-mode assertion also failed because Windowsst_modeis often 0o666 (438), not 0o600.This keeps the POSIX checks intact:
_readstill usesO_NOFOLLOWand still rejects group/other permission bits only on POSIX, and_write_exclusivestill opens the answer file with mode 0o600._readnow alsolstats the path and refuses a symlink, which is what actually excludes links on Windows. The 0o600 assertion and the "other users can read" test stay strict on POSIX and are not run as POSIX bit checks on Windows.The pull request also bumps openadapt-desktop from 0.31.0 to 0.31.1. That patch bump is only because the desktop release-intent check requires a version change for a fix that should ship. Merging this pull request ships Desktop 0.31.1 through the normal release pipeline.
The Rust lockfile audit failure comes from upstream advisories in the existing lockfile (RUSTSEC-2026-0221, RUSTSEC-2024-0429, RUSTSEC-2026-0486, and a yanked async-executor). It is not related to this change:
Cargo.lockdiffers from main only in the openadapt-desktop version string.Observed on:
d30166bePackages 45007372801, desktop Python engine tests windows-latest py3.12 job 137167041107 and py3.11 job 137167041148923f0a04Packages 45013930658, desktop Python engine tests windows-latest py3.12 job 137183885862 (same three tests; Ubuntu and macOS stayed green)