Repository navigation
Conversation
A default HTTP handler whose desktop entry's Exec is omarchy-launch-browser made every launch recurse: each generation probed the command's --help and handed the URL to another generation through systemd-run, doubling until the process table filled (omacom#15581). omarchy-cmd-default-browser only skips the well-known omarchy-browser.desktop, so any other entry resolving back to the launcher still reached the recursion. Exit with an error naming the entry instead.
[Low impact] The change is limited to browser link launches with a self-referencing default entry. The PR appears safe to merge, with a non-blocking fix needed for the test stub. Findings
SummaryThe launcher now rejects a default browser entry whose command is named
Reviews (1) · Last reviewed commit: "Refuse a default browser entry that runs..." · Reviewed by Greptile |
| cat >"$mock_bin/omarchy-launch-browser" <<'SH' | ||
| #!/bin/bash | ||
| printf '%s\n' "$*" >>"$OMARCHY_TEST_BROWSER_RECURSE" | ||
| SH |
There was a problem hiding this comment.
The new omarchy-launch-browser stub is never made executable. Since $ROOT/bin follows $mock_bin in PATH, an unexpected call skips the stub and runs the real launcher instead. Add chmod +x "$mock_bin/omarchy-launch-browser" so the test can safely record re-entry in recurse_log.
| cat >"$mock_bin/omarchy-launch-browser" <<'SH' | |
| #!/bin/bash | |
| printf '%s\n' "$*" >>"$OMARCHY_TEST_BROWSER_RECURSE" | |
| SH | |
| cat >"$mock_bin/omarchy-launch-browser" <<'SH' | |
| #!/bin/bash | |
| printf '%s\n' "$*" >>"$OMARCHY_TEST_BROWSER_RECURSE" | |
| SH | |
| chmod +x "$mock_bin/omarchy-launch-browser" |
|
Thanks for this. It has not been verified yet, and nothing has been run: the classification needs a second model to agree, and the second opinion (Codex Medium) did not run today because the reviewer's daily review limit was used up. So the pull request has no class label and nothing has been run on a test machine. It goes round again once a second opinion is available. I (Claude Opus 5.5, alone) read it against
Next, this waits on the second opinion. Once the class is agreed, the fix will be reproduced on a worker, failing on |
Fixes #15581
Problem
A default HTTP/HTTPS handler whose desktop entry's
Exec=resolves toomarchy-launch-browsermade every browser launch recurse: each generation probed the command's--help(spawning one more launcher) and handed the URL to another generation throughsystemd-run(spawning yet another), doubling until the process table filled and the session stalled.omarchy-cmd-default-browseronly skips the well-knownomarchy-browser.desktopwhen walking the mimeapps lists, so any other entry that resolves back to the launcher — a renamed copy ofomarchy-browser.desktop, a user-written entry, or anything else withExec=omarchy-launch-browser— still reaches the recursion on quattro.Fix
bin/omarchy-launch-browsernow refuses to run when the resolved browser command isomarchy-launch-browseritself: it prints an error naming the offending entry to stderr and exits non-zero before probing flags or handing anything tosystemd-run.Test
Extended
test/shell.d/launch-browser-test.shwith a self-referencing entry (selfref.desktopwithExec=omarchy-launch-browser %U) set as thex-scheme-handler/httpdefault in a private mimeapps.list:systemd-run.systemd-run, and the error names the entry.default-browser-lookup,browser-envandbrowser-link-handofftests all still pass.