Skip to content

feat(paywalls): isolate web_view content with a fixed CSP#3652

Draft
alexrepty wants to merge 1 commit into
alexrepty/paywalls-web-view-renderingfrom
alexrepty/paywalls-web-view-csp
Draft

feat(paywalls): isolate web_view content with a fixed CSP#3652
alexrepty wants to merge 1 commit into
alexrepty/paywalls-web-view-renderingfrom
alexrepty/paywalls-web-view-csp

Conversation

@alexrepty

Copy link
Copy Markdown
Contributor

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-ios and hybrids

Motivation

Description

alexrepty commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.33%. Comparing base (71e76e1) to head (353f584).

Additional details and impacted files
@@                          Coverage Diff                           @@
##           alexrepty/paywalls-web-view-rendering    #3652   +/-   ##
======================================================================
  Coverage                                  80.33%   80.33%           
======================================================================
  Files                                        383      383           
  Lines                                      15717    15717           
  Branches                                    2194     2194           
======================================================================
  Hits                                       12627    12627           
  Misses                                      2213     2213           
  Partials                                     877      877           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexrepty alexrepty force-pushed the alexrepty/paywalls-web-view-rendering branch from 38f5302 to 6c73e7c Compare June 26, 2026 14:20
@alexrepty alexrepty force-pushed the alexrepty/paywalls-web-view-csp branch from a3e9e1a to 0dffacc Compare June 26, 2026 14:20
When a `web_view` declares a `protocol_version`, the renderer injects a fixed Content-Security-Policy meta tag at document start to isolate the content from external sources: only same-origin images/scripts/fonts are allowed, `data:` references for images/fonts are blocked, and XHR/fetch/WebSocket are disallowed (`connect-src 'none'`). Geolocation is disabled. The bundle must be fully self-contained.

Recommended labels: pr:other, pr:RevenueCatUI, feat:Paywalls_V2
@alexrepty alexrepty force-pushed the alexrepty/paywalls-web-view-rendering branch from 6c73e7c to 71e76e1 Compare June 26, 2026 14:26
@alexrepty alexrepty force-pushed the alexrepty/paywalls-web-view-csp branch from 0dffacc to 353f584 Compare June 26, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant