Repository navigation
fix(desktop): validate group padding before hidden ID masking - #12708
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
morluto
enabled auto-merge (squash)
November 20, 2026 02:37
5 tasks
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryPreserves group-header padding so malformed hidden overrides cannot mask an application ID.
Reviews (1) · Last reviewed commit: "test(desktop): compact group padding ove..." · Reviewed by Greptile |
This was referenced Nov 20, 2026
4 of 19 tasks
N0zoM1z0
pushed a commit
that referenced
this pull request
Nov 21, 2026
…13126) The key reader stripped each line with JavaScript's trimStart(), which also removes Unicode spaces such as U+00A0 and U+3000. GLib skips only g_ascii_isspace, so it keeps those bytes inside the key and the record never matches Name= or Hidden=. The drift had a safety direction: a line indented with U+00A0 and reading Hidden=true was accepted as a hidden override by REA but never by the desktop environment, so findHiddenDesktopEntry() claimed a deletion that GLib would not honour. #12708 closed this for group headers by validating the captured padding against GLib's ASCII set; the blank-line, comment and key checks still used the Unicode-aware trim. I now strip only [ \t\f\r] before deciding whether a line is blank, a comment or a key, and hand that same string to the record matcher. ASCII indentation still parses as before. The inventory test covers the refusal when a hidden override carries the padding, and the domain tests cover the three Unicode spaces for keys, blank lines and comments.
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.
Problem
The desktop entry parser trimmed all Unicode whitespace before interpreting group headers. As a result, a higher-priority entry with a nonbreaking space before or after
[Desktop Entry]could useHidden=trueto mask a lower-priority valid application ID. GLib rejects those group headers.Change
The desktop entry scan retains the original header padding and validates it before application-ID lookup accepts a hidden override as a deletion. Existing direct-file and nonhidden discovery still use the tolerant group boundary. A malformed hidden entry returns
desktop_entry_invalidwith the group line.This changes validation in the existing local file reader. No input or output schema, target authority, or scope decision changes.
Validation
desktop_entry_not_foundon the base. They now reportdesktop_entry_invalidat line 1. The space/tab-padded control still masks its application ID.npm run check:fastpassed.Author readiness
Human owner: @morluto