Repository navigation
chore: sync plus with upstream main (upstream-preferred conflicts) #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
23ad7f8
b2d7719
76ff70e
b7e167b
de1e506
731a82e
bc74536
93c72de
e456de0
258867b
b4b297a
1d031a4
f1077ef
d4ad7ff
4c6c321
36b729d
41fd9de
28bb2c6
6048e90
7217b52
b789b68
6f2d328
1834b97
f368a1b
4c1c870
3fa04a3
984fa85
3ab4139
5e5bb3b
5ac4dd6
ee586ae
0c9e35d
c567328
035b16a
e37d9c6
5e0f678
145560e
eb87c8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,33 +3,29 @@ | |
| All notable changes to this project will be documented in this file. | ||
| See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
|
||
| ## [8.5.2](https://github.com/Cap-go/capacitor-plus/compare/8.5.1...8.5.2) (2026-08-26) | ||
|
|
||
| **Note:** Version bump only for package capacitor | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| ## [8.5.1](https://github.com/Cap-go/capacitor-plus/compare/8.3.12...8.5.1) (2026-08-25) | ||
|
|
||
| ## [8.5.2](https://github.com/ionic-team/capacitor/compare/8.5.1...8.5.2) (2026-09-11) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The upstream-preferred conflict resolution replaced the fork's own 8.5.1/8.5.2 release entries with upstream's, erasing real fork releases. Cap-go published Prompt for AI agentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This upstream section overwrites the fork's 8.5.2 release history and points users at the wrong repository comparison. Merge the upstream entries into the existing Cap-go release sections while preserving the plus-only release notes and dates. Prompt for AI agents |
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * **ci:** fetch upstream objects so plus branch sync works ([#109](https://github.com/Cap-go/capacitor-plus/issues/109)) ([1fa7eee](https://github.com/Cap-go/capacitor-plus/commit/1fa7eeeff9494e9b32afb20a9850389b79d6bcec)) | ||
| * **ci:** resolve modify/delete conflicts in sync conflict PRs ([#110](https://github.com/Cap-go/capacitor-plus/issues/110)) ([5c29fb9](https://github.com/Cap-go/capacitor-plus/commit/5c29fb9af001b9aafdcde7b7054585e093f44431)) | ||
|
|
||
| - **android:** add null checks for plugin annotation when retrieving permissions ([#8400](https://github.com/ionic-team/capacitor/issues/8400)) ([035b16a](https://github.com/ionic-team/capacitor/commit/035b16aca15eab136efc49eaec64b45987cfefeb)) | ||
| - **ios:** do not forward scene lifecycle events to the page before it has loaded ([#8595](https://github.com/ionic-team/capacitor/issues/8595)) ([c567328](https://github.com/ionic-team/capacitor/commit/c567328d0feb90c306ea824edc5a799bdfe26542)) | ||
| - resolve issues with safe area / systembars plugin ([#8535](https://github.com/ionic-team/capacitor/issues/8535)) ([e37d9c6](https://github.com/ionic-team/capacitor/commit/e37d9c60785368acf2a83cfd4c20f47076672bdd)) | ||
|
|
||
| ## [8.5.1](https://github.com/ionic-team/capacitor/compare/8.5.0...8.5.1) (2026-08-31) | ||
|
|
||
| ### Bug Fixes | ||
|
|
||
| - block navigation to the internal HTTP proxy path ([ee586ae](https://github.com/ionic-team/capacitor/commit/ee586ae680887ba99d066616f976db149542d922)) | ||
| - **cli:** use POSIX paths in CapApp-SPM Package.swift ([#8549](https://github.com/ionic-team/capacitor/issues/8549)) ([5e5bb3b](https://github.com/ionic-team/capacitor/commit/5e5bb3befc312477900252ab07e23b596f8cb0d1)) | ||
| - **core:** prevent removeListener from removing wrong listener ([#8271](https://github.com/ionic-team/capacitor/issues/8271)) ([5ac4dd6](https://github.com/ionic-team/capacitor/commit/5ac4dd613ae989d8dc8738ea25b77efbd4fa21fe)) | ||
|
|
||
| # [8.5.0](https://github.com/ionic-team/capacitor/compare/8.4.2...8.5.0) (2026-07-31) | ||
|
|
||
| ## Bug Fixes | ||
| ### Bug Fixes | ||
|
|
||
| - **cli:** support TypeScript 7 when loading capacitor.config.ts ([#8534](https://github.com/ionic-team/capacitor/issues/8534)) ([4c1c870](https://github.com/ionic-team/capacitor/commit/4c1c8709413b9c19b008c99122ca330cc3c90e6f)) | ||
|
|
||
| ## Features | ||
| ### Features | ||
|
|
||
| - **cli:** add migrator functionality for adopting UIScene ([#8544](https://github.com/ionic-team/capacitor/issues/8544)) ([984fa85](https://github.com/ionic-team/capacitor/commit/984fa85ba0adab0aacf895aed6323bf4b503dccb)) | ||
| - **ios:** UIScene Support ([#8536](https://github.com/ionic-team/capacitor/issues/8536)) ([3fa04a3](https://github.com/ionic-team/capacitor/commit/3fa04a357c92af34cd6fccb8124791963804a9dc)) | ||
|
|
@@ -49,14 +45,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline | |
|
|
||
| # [8.4.0](https://github.com/ionic-team/capacitor/compare/8.3.4...8.4.0) (2026-06-02) | ||
|
|
||
| ## Bug Fixes | ||
| ### Bug Fixes | ||
|
|
||
| - **android:** show only the requested system bar ([#8480](https://github.com/ionic-team/capacitor/issues/8480)) ([4c6c321](https://github.com/ionic-team/capacitor/commit/4c6c3219afb5223211e857457e46283c37eb9424)) | ||
| - **cli:** revert live reload config on failure ([#8485](https://github.com/ionic-team/capacitor/issues/8485)) ([1d031a4](https://github.com/ionic-team/capacitor/commit/1d031a4abec2c793079ba8897ad2e40c4cc6c7f9)) | ||
| - **SystemBars:** make `safe-area-inset-x` available on API <= 34 ([#8424](https://github.com/ionic-team/capacitor/issues/8424)) ([e456de0](https://github.com/ionic-team/capacitor/commit/e456de083e19644f484bec5a5359cb67960ac8bc)) | ||
| - **SystemBars:** respect `insetsHandling` disable ([#8481](https://github.com/ionic-team/capacitor/issues/8481)) ([d4ad7ff](https://github.com/ionic-team/capacitor/commit/d4ad7ffe39daf66e0cfc63af9028d5c05543bde7)) | ||
|
|
||
| ## Features | ||
| ### Features | ||
|
|
||
| - add method getDouble to plugin config ([#7638](https://github.com/ionic-team/capacitor/issues/7638)) ([93c72de](https://github.com/ionic-team/capacitor/commit/93c72de40a2ec4c78b33659250cb08340083088e)) | ||
| - **cli:** add experimental packageOptions ([#8471](https://github.com/ionic-team/capacitor/issues/8471)) ([258867b](https://github.com/ionic-team/capacitor/commit/258867b7bf37b1837b99b02ec9638e5a6df08d97)) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,21 +3,18 @@ | |
| All notable changes to this project will be documented in this file. | ||
| See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
|
||
| ## [8.5.2](https://github.com/Cap-go/capacitor-plus/compare/8.5.1...8.5.2) (2026-08-26) | ||
| ## [8.5.2](https://github.com/ionic-team/capacitor/compare/8.5.1...8.5.2) (2026-09-11) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This sync replaces the fork's own 8.5.1/8.5.2 entries (published Aug 25/26 as version-bump-only releases of @capacitor-plus/android) with upstream's release notes for the same version numbers. The new entries now attribute the proxy-path security fix (ee586ae) to 8.5.1 (2026-08-31) and fixes ionic-team#8400/ionic-team#8535 to 8.5.2 (2026-09-11), but those commits only reach plus in this PR, so the shipped 8.5.1/8.5.2 packages never contained them. Users checking the published release notes for the security fix will conclude already-shipped versions are patched when they are not. Keep the fork's published-version entries and document these fixes under the upcoming (unreleased) version instead of rewriting shipped history. Prompt for AI agents |
||
|
|
||
| **Note:** Version bump only for package @capacitor-plus/android | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| ## [8.5.1](https://github.com/Cap-go/capacitor-plus/compare/8.3.12...8.5.1) (2026-08-25) | ||
|
|
||
| **Note:** Version bump only for package @capacitor-plus/android | ||
| ### Bug Fixes | ||
|
|
||
| - **android:** add null checks for plugin annotation when retrieving permissions ([#8400](https://github.com/ionic-team/capacitor/issues/8400)) ([035b16a](https://github.com/ionic-team/capacitor/commit/035b16aca15eab136efc49eaec64b45987cfefeb)) | ||
| - resolve issues with safe area / systembars plugin ([#8535](https://github.com/ionic-team/capacitor/issues/8535)) ([e37d9c6](https://github.com/ionic-team/capacitor/commit/e37d9c60785368acf2a83cfd4c20f47076672bdd)) | ||
|
|
||
| ## [8.5.1](https://github.com/ionic-team/capacitor/compare/8.5.0...8.5.1) (2026-08-31) | ||
|
|
||
| ### Bug Fixes | ||
|
|
||
| - block navigation to the internal HTTP proxy path ([ee586ae](https://github.com/ionic-team/capacitor/commit/ee586ae680887ba99d066616f976db149542d922)) | ||
|
|
||
| # [8.5.0](https://github.com/ionic-team/capacitor/compare/8.4.2...8.5.0) (2026-07-31) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <application> | ||
| <activity | ||
| android:name="com.getcapacitor.android.TestHostActivity" | ||
| android:theme="@style/AppTheme.NoActionBar" | ||
| android:exported="false" /> | ||
| </application> | ||
| </manifest> |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,115 @@ | ||||||||
| package com.getcapacitor.android; | ||||||||
|
|
||||||||
| import static org.junit.Assert.assertFalse; | ||||||||
| import static org.junit.Assert.assertNotNull; | ||||||||
| import static org.junit.Assert.assertNull; | ||||||||
| import static org.junit.Assert.assertTrue; | ||||||||
|
|
||||||||
| import android.net.Uri; | ||||||||
| import android.webkit.WebResourceRequest; | ||||||||
| import androidx.test.core.app.ActivityScenario; | ||||||||
| import androidx.test.ext.junit.runners.AndroidJUnit4; | ||||||||
| import com.getcapacitor.Bridge; | ||||||||
| import java.util.HashMap; | ||||||||
| import java.util.Map; | ||||||||
| import org.junit.Test; | ||||||||
| import org.junit.runner.RunWith; | ||||||||
|
|
||||||||
| /** | ||||||||
| * The proxy path shares the app's host and scheme, so the host/scheme guard alone would let it | ||||||||
| * load in the WebView. | ||||||||
| */ | ||||||||
| @RunWith(AndroidJUnit4.class) | ||||||||
| public class HttpInterceptorNavigationTest { | ||||||||
|
|
||||||||
| private static final String INTERCEPTOR_URL = | ||||||||
| "https://localhost" + Bridge.CAPACITOR_HTTP_INTERCEPTOR_START + "?u=https://example.com/payload.html"; | ||||||||
| private static final String IN_APP_URL = "https://localhost/index.html"; | ||||||||
| private static final String EXTERNAL_URL = "https://example.com/"; | ||||||||
|
|
||||||||
| /** A plugin registered by the test host returns "allow" for the proxy path; it must not win. */ | ||||||||
| @Test | ||||||||
| public void blocksNavigationToInterceptorPath() { | ||||||||
| try (ActivityScenario<TestHostActivity> scenario = ActivityScenario.launch(TestHostActivity.class)) { | ||||||||
| scenario.onActivity((activity) -> { | ||||||||
| Bridge bridge = activity.getBridge(); | ||||||||
| assertNotNull(bridge); | ||||||||
| assertTrue("interceptor navigation must be blocked", bridge.launchIntent(Uri.parse(INTERCEPTOR_URL))); | ||||||||
| assertFalse("in-app navigation must stay in the WebView", bridge.launchIntent(Uri.parse(IN_APP_URL))); | ||||||||
| assertTrue("external navigation must leave the WebView", bridge.launchIntent(Uri.parse(EXTERNAL_URL))); | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Prompt for AI agents
Suggested change
|
||||||||
| }); | ||||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
| /** An iframe looks like a fetch to isForMainFrame(), so subframe documents must be refused too. */ | ||||||||
| @Test | ||||||||
| public void refusesProxyForDocumentRequests() { | ||||||||
| try (ActivityScenario<TestHostActivity> scenario = ActivityScenario.launch(TestHostActivity.class)) { | ||||||||
| scenario.onActivity((activity) -> { | ||||||||
| Bridge bridge = activity.getBridge(); | ||||||||
| assertNotNull(bridge); | ||||||||
| // Without this the proxy refuses everything and the assertions below prove nothing. | ||||||||
| assertTrue( | ||||||||
| "CapacitorHttp must be enabled for this test to mean anything", | ||||||||
| bridge.getConfig().getPluginConfiguration("CapacitorHttp").getBoolean("enabled", false) | ||||||||
| ); | ||||||||
|
|
||||||||
| Map<String, String> navHeaders = new HashMap<>(); | ||||||||
| navHeaders.put("Accept", "text/html,application/xhtml+xml"); | ||||||||
| navHeaders.put("Upgrade-Insecure-Requests", "1"); | ||||||||
|
|
||||||||
| assertNull( | ||||||||
| "main frame document must be refused", | ||||||||
| bridge.getLocalServer().shouldInterceptRequest(new FakeRequest(INTERCEPTOR_URL, true, navHeaders)) | ||||||||
| ); | ||||||||
| assertNull( | ||||||||
| "iframe document must be refused", | ||||||||
| bridge.getLocalServer().shouldInterceptRequest(new FakeRequest(INTERCEPTOR_URL, false, navHeaders)) | ||||||||
| ); | ||||||||
| }); | ||||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
| private static class FakeRequest implements WebResourceRequest { | ||||||||
|
|
||||||||
| private final Uri url; | ||||||||
| private final boolean mainFrame; | ||||||||
| private final Map<String, String> headers; | ||||||||
|
|
||||||||
| FakeRequest(String url, boolean mainFrame, Map<String, String> headers) { | ||||||||
| this.url = Uri.parse(url); | ||||||||
| this.mainFrame = mainFrame; | ||||||||
| this.headers = headers; | ||||||||
| } | ||||||||
|
|
||||||||
| @Override | ||||||||
| public Uri getUrl() { | ||||||||
| return url; | ||||||||
| } | ||||||||
|
|
||||||||
| @Override | ||||||||
| public boolean isForMainFrame() { | ||||||||
| return mainFrame; | ||||||||
| } | ||||||||
|
|
||||||||
| @Override | ||||||||
| public boolean isRedirect() { | ||||||||
| return false; | ||||||||
| } | ||||||||
|
|
||||||||
| @Override | ||||||||
| public boolean hasGesture() { | ||||||||
| return false; | ||||||||
| } | ||||||||
|
|
||||||||
| @Override | ||||||||
| public String getMethod() { | ||||||||
| return "GET"; | ||||||||
| } | ||||||||
|
|
||||||||
| @Override | ||||||||
| public Map<String, String> getRequestHeaders() { | ||||||||
| return headers; | ||||||||
| } | ||||||||
| } | ||||||||
| } | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package com.getcapacitor.android; | ||
|
|
||
| import android.net.Uri; | ||
| import com.getcapacitor.Bridge; | ||
| import com.getcapacitor.Plugin; | ||
| import com.getcapacitor.annotation.CapacitorPlugin; | ||
|
|
||
| /** A plugin that tries to allow the proxy path. The navigation guard must ignore it. */ | ||
| @CapacitorPlugin(name = "InterceptorAllowingPlugin") | ||
| public class InterceptorAllowingPlugin extends Plugin { | ||
|
|
||
| @Override | ||
| public Boolean shouldOverrideLoad(Uri url) { | ||
| String path = url.getPath(); | ||
| if (path != null && path.startsWith(Bridge.CAPACITOR_HTTP_INTERCEPTOR_START)) { | ||
| return false; // "allow this navigation" | ||
| } | ||
| return null; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.getcapacitor.android; | ||
|
|
||
| import com.getcapacitor.BridgeActivity; | ||
| import com.getcapacitor.CapConfig; | ||
| import org.json.JSONException; | ||
| import org.json.JSONObject; | ||
|
|
||
| /** | ||
| * Host for instrumented tests. CapacitorHttp is on so the proxy is reachable, and a plugin that | ||
| * tries to allow the proxy path is registered so tests can prove the guard still wins. | ||
| */ | ||
| public class TestHostActivity extends BridgeActivity { | ||
|
|
||
| @Override | ||
| protected void load() { | ||
| registerPlugin(InterceptorAllowingPlugin.class); | ||
|
|
||
| try { | ||
| JSONObject plugins = new JSONObject("{\"CapacitorHttp\":{\"enabled\":true}}"); | ||
| config = new CapConfig.Builder(this).setPluginsConfiguration(plugins).create(); | ||
| } catch (JSONException e) { | ||
| throw new IllegalStateException("bad test plugin config", e); | ||
| } | ||
|
|
||
| super.load(); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -394,6 +394,12 @@ private int extractWebViewMajorVersion(final PackageManager pm, final String web | |||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| public boolean launchIntent(Uri url) { | ||||||||||||||||||||||||
| // The proxy returns a remote body at the app origin, so block it before plugins can allow it. | ||||||||||||||||||||||||
| String path = url.getPath(); | ||||||||||||||||||||||||
| if (path != null && path.startsWith(CAPACITOR_HTTP_INTERCEPTOR_START)) { | ||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||
|
Comment on lines
+398
to
+400
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This guard blocks external URLs solely because their path uses the reserved prefix. A link such as Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||
| * Give plugins the chance to handle the url | ||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||
|
|
@@ -1262,6 +1268,10 @@ protected Map<String, PermissionState> getPermissionStates(Plugin plugin) { | |||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||
| Logger.warn( | ||||||||||||||||||||||||
| String.format("getPermissionStates: missing @CapacitorPlugin annotation for plugin %s", plugin.getPluginHandle().getId()) | ||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| return permissionsResults; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: This raises every CI job's timeout from 10 to 30 minutes, contradicting AGENTS.md's Timeout Policy ("Keep CI, script, and runtime timeouts at 10 minutes or less. Use
timeout-minutes: 10or lower ... unless explicitly requested"). Three of these jobs (lint, test-cli, test-ios) run on macos-15 public runners (10x billing), so a hung job now burns up to 30 macOS minutes instead of 10. Revert to 10, or update AGENTS.md's Timeout Policy to explicitly document this exception.Prompt for AI agents