Repository navigation
Conversation
|
Git applied the upstream-preferred strategy to resolve this sync. Please review the branch carefully before merging. |
|
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 2 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. |
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. |
Beta npm buildMaintainers can publish one Capacitor Plus workspace package from this PR to npm for fast testing. Comment Examples: /publish-beta core
/publish-beta cli
/publish-beta @capacitor-plus/coreIf exactly one workspace package changed, Packages:
The workflow will:
Security note: beta publish is only enabled for branches inside this repository. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e464a7d2e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (isEnabled()) { | ||
| this.bridge.getWebView().addJavascriptInterface(this, "CapacitorCookiesAndroidInterface"); |
There was a problem hiding this comment.
Preserve the scoped-bridge guard when enabling cookies
For Android apps using Bridge.Builder.setWebMessagePolicy(...) with CapacitorCookies enabled, this replaces the guard that prevented exposing the cookie interface outside the scoped bridge. Unlike the origin and main-frame checks in MessageHandler, this interface has no caller validation, and its annotated setCookie(String, String) method delegates directly to the native cookie manager. Consequently, untrusted frames can modify cookies for domains outside their own origin despite the configured bridge policy. Retain the !bridge.hasScopedWebMessages() condition alongside the enabled check.
Useful? React with 👍 / 👎.
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| ## [8.6.5](https://github.com/Cap-go/capacitor-plus/compare/8.6.4...8.6.5) (2026-11-11) |
There was a problem hiding this comment.
Restore the CI-managed changelogs
This sync removes historical whitespace from the root and four package changelogs even though these changes are unrelated to the bridge fix. The root AGENTS.md explicitly reserves CHANGELOG.md updates for CI/CD and prohibits manual edits. Revert the changelog modifications and leave their regeneration to the release workflow.
AGENTS.md reference: AGENTS.md:L75-L77
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
2 issues found across 17 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="android/capacitor/src/main/java/com/getcapacitor/plugin/CapacitorCookies.java">
<violation number="1" location="android/capacitor/src/main/java/com/getcapacitor/plugin/CapacitorCookies.java:23">
P1: This drops the `hasScopedWebMessages()` guard, so with scoped web messages and `CapacitorCookies.enabled`, `CapacitorCookiesAndroidInterface` (including `setCookie`) is exposed through `addJavascriptInterface` to any origin the WebView loads. Keep the scoped check and add the enabled check: `if (!bridge.hasScopedWebMessages() && isEnabled())`.</violation>
</file>
<file name="core/src/tests/bridge.spec.ts">
<violation number="1" location="core/src/tests/bridge.spec.ts:132">
P2: This removes the only tests covering binary fetch handling (Blob and ArrayBuffer request bodies, and byte-for-byte binary responses). The native-bridge.ts logic for these paths is unchanged, so the regressions would go undetected. Restore these three tests, or move them to the new config-based setup.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| @Override | ||
| public void load() { | ||
| if (!bridge.hasScopedWebMessages()) { | ||
| if (isEnabled()) { |
There was a problem hiding this comment.
P1: This drops the hasScopedWebMessages() guard, so with scoped web messages and CapacitorCookies.enabled, CapacitorCookiesAndroidInterface (including setCookie) is exposed through addJavascriptInterface to any origin the WebView loads. Keep the scoped check and add the enabled check: if (!bridge.hasScopedWebMessages() && isEnabled()).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At android/capacitor/src/main/java/com/getcapacitor/plugin/CapacitorCookies.java, line 23:
<comment>This drops the `hasScopedWebMessages()` guard, so with scoped web messages and `CapacitorCookies.enabled`, `CapacitorCookiesAndroidInterface` (including `setCookie`) is exposed through `addJavascriptInterface` to any origin the WebView loads. Keep the scoped check and add the enabled check: `if (!bridge.hasScopedWebMessages() && isEnabled())`.</comment>
<file context>
@@ -20,7 +20,7 @@ public class CapacitorCookies extends Plugin {
@Override
public void load() {
- if (!bridge.hasScopedWebMessages()) {
+ if (isEnabled()) {
this.bridge.getWebView().addJavascriptInterface(this, "CapacitorCookiesAndroidInterface");
}
</file context>
| if (isEnabled()) { | |
| if (!bridge.hasScopedWebMessages() && isEnabled()) { |
| }); | ||
| }); | ||
|
|
||
| it('android patched fetch sends Blob bodies as base64 binary data', async () => { |
There was a problem hiding this comment.
P2: This removes the only tests covering binary fetch handling (Blob and ArrayBuffer request bodies, and byte-for-byte binary responses). The native-bridge.ts logic for these paths is unchanged, so the regressions would go undetected. Restore these three tests, or move them to the new config-based setup.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At core/src/tests/bridge.spec.ts, line 132:
<comment>This removes the only tests covering binary fetch handling (Blob and ArrayBuffer request bodies, and byte-for-byte binary responses). The native-bridge.ts logic for these paths is unchanged, so the regressions would go undetected. Restore these three tests, or move them to the new config-based setup.</comment>
<file context>
@@ -129,119 +129,53 @@ describe('bridge', () => {
- expect(callData.options.data).toBe('AQI=');
- expect(callData.options.dataType).toBe('binary');
- expect(callData.options.headers['content-type']).toBe('application/octet-stream');
+ it('android patches fetch when CapacitorNativeConfig.httpEnabled is true without CapacitorHttpAndroidInterface', () => {
+ const originalFetch = window.fetch;
+ const originalXHR = window.XMLHttpRequest;
</file context>
|
Git applied the upstream-preferred strategy to resolve this sync. Please review the branch carefully before merging. |
a45c59a to
8d46964
Compare
|
Git applied the upstream-preferred strategy to resolve this sync. Please review the branch carefully before merging. |
…cted global Assisted-by: MindRoom DevAgent:google/gemini-4-neon <https://github.com/mindroom-ai/mindroom> (cherry picked from commit 54e00c6)
8d46964 to
ad922c0
Compare
|
Git applied the upstream-preferred strategy to resolve this sync. Please review the branch carefully before merging. |
Merge Conflict Review Required
The sync of upstream PR ionic-team#8745 from @basnijholt encountered merge conflicts.
Original PR: ionic-team#8745
What happened
Synced from upstream by Capacitor+ Bot
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.