Repository navigation
feat(extensions): install from the Extension Store link on every client - #51
Merged
Merged
Conversation
A main-frame navigation the user starts (a typed load or a link click with a gesture) to https://extension.tarnbrowser.com/install/<id> is cancelled before any request and opens the usual consent for that id, taken only from Tarn's own verified catalog (fetched first when missing or stale). Unknown, revoked or installed ids get a notice; private spaces, burner tabs and Lockdown install nothing. Redirects, subframes and script navigations without a gesture load normally. Settings > Extensions links the store. On macOS, Windows, Linux, iOS and Android. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
…catalog requests Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
…nals only on iOS Core::admit_store_link takes at most one store link per install::STORE_LINK_INTERVAL and every shell ignores the others without a sheet. iOS no longer reads WebKit's private _isUserInitiated and _isRedirect: a shell load or a main-frame linkActivated navigation asks, so a page's own script-started link click can raise the sheet there, at most once per 10 s, and nothing installs without the user's confirmation. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
…ests nothing store_step no longer fetches: with a fresh verified catalog the link opens a confirmation in Settings > Extensions built only from the signed entry (store_sheet); without one a notice points to Settings > Extensions. Install there re-checks everything (store_confirm: same entry, fresh catalog, not revoked or installed, no install in progress, store_link_allowed for the tab), then downloads and unpacks; a package within that entry installs without a second prompt (store_confirmed). Refusals, including private spaces, burner tabs and an install in progress, show a notice on the tab on every client instead of switching screens. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
…ore tests Every engine decides with nav_policy::store_link_asks. Linux marks a pop-up tab's first load as the page's link, and mobile opens a pop-up to an install link with its opener instead of as a routed fresh tab. The WebKit window test proves each refused case reached the store link (blocked by a test content rule, so nothing leaves the machine) and that the page's script ran. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
…mation install::offer_store_link holds the confirmation for desktop and the shared NSH pane; only an install that is running, its consent or a package choice counts as busy. Install on the sheet still re-checks everything with store_confirm. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
…ay local The display test blocks the store host with a content rule, checks that every refused navigation reached decide_navigation (recorded in the test-only event log) and that the main-frame ones were stopped by the rule. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
install::StoreSheet gives every store offer a token (a sequence number and the entry's id and SHA-256). The Install button carries the token of the sheet it was drawn for and StoreSheet::take refuses any other, and refuses clicks within STORE_CONFIRM_DELAY (700 ms) of a sheet appearing or being replaced; macOS and Windows also need Browser::layout_stable. Closing Settings > Extensions (desktop pane or window, Linux panel, mobile screen) drops an unanswered sheet. A page that raises a second sheet just before the user taps Install can no longer get it installed. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
…e install on iOS Matches S18 and docs/mobile-plan.md; the sheet token and confirm delay are described there too. Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
Signed-off-by: Leopold <77323443+MadebyLeopold@users.noreply.github.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
3 of 7 tasks
rgxdev
approved these changes
Nov 17, 2026
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.
Closes #
What changed
Tarn handles the Install in Tarn link of the Extension Store at extensions.tarnbrowser.com (Quavon-dev/tarn-extensions#1) on every client.
engine::tarn_ext::store_install(&Url)accepts onlyhttps://extensions.tarnbrowser.com/install/<id>(no other scheme, host, port, userinfo or path; the id must pass the catalog's id rule).browser_core::extensions::installadds the store sheet: aStoreTokenper sheet,STORE_CONFIRM_DELAY(700 ms) before Install works, andStoreSheet::take(token, now), so Install confirms only the sheet it was drawn for and a page can't swap the sheet under the click. At most one store link per 10 s (admit_store_link).crates/app), Linux (WebKitGTK policy decision), iOS (navigation delegate, public API only), Android (shouldOverrideUrlLoadingwithhasGestureand notisRedirect). Settings › Extensions on every client gets a "Browse the store" link.docs/threat-model.mdS18 (web page → install prompt),docs/shared-core.md§1, the iOS gap indocs/mobile-plan.md, the Linux frame gap indocs/nsh-plan.md,PRIVACY.md(the link itself makes no request),CHANGELOG.md.main(feat(ui): revamp across macOS, Windows, Linux, iOS and Android #47);linux/src/ui.rsandmobile/app/src/ui/mod.rskeep both the store-link and the new icon and edit handling.Threat model S18: the page gets no channel into the shell. It can only cause a navigation, and Tarn reads nothing from it but the id in the address. The sheet shows only the signed catalog's entry, waits for the user, and can't be swapped under the click.
Screenshots
The store this links from:
The install link opened in another browser (no download):
How it was tested
CONTRIBUTING.mdpasses for the workspaces touched; checks not run, and why:nsh-sharedandmobilecargo fmt --check,clippy -D warningsandcargo test;mobileclippy foraarch64-apple-ios-sim;linuxfmt, clippy, tests andscripts/display-tests.sh(Fedora container), includingonly_the_users_own_navigation_to_a_store_link_asks_to_install;mobile/android/build.sh;scripts/check-dco.sh.mobile/app/testscover it.cargo deny checkwas not needed: no manifest or lockfile changes.status: approved(features and large changes) — maintainer's own work.github/CODEOWNERS) beyond what a maintainer asked for — touchesdocs/,PRIVACY.mdand the engine's extension code; maintainer's own workAGENTS.md