Repository navigation
feat: honor remote session replay masking flags on mobile - #753
Merged
Merged
Conversation
Contributor
posthog-flutter Compliance ReportDate: 2026-12-02T09:54:00.184760+00:00 ✅ All Tests Passed!232/232 tests passed Capture_V1 Tests✅ 105/105 tests passed View Details
Capture_Ai_V1 Tests✅ 110/110 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
Contributor
ioannisj
marked this pull request as ready for review
December 2, 2026 09:57
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 Reviews
|
marandaneto
approved these changes
Dec 2, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
The code looks good; no qualifying findings. Verdict: correct.
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.

💡 Motivation and Context
Fixes #492
Session replay masking in Flutter came only from local Dart config, so the masking flags the project settings send for mobile (
sessionRecording.masking.mobile) had no effect. This makes the plugin honor them: a server value oftrueturns on masking for text and images in Flutter content, and a localtrueis never turned off. The native SDKs resolve the flags, and the plugin reads them back on every capture tick and again right before it sends a frame. If a flag turned on in between, the frame is dropped and a new one is captured. A flag turning off, or native returning no value, doesn't loosen masking for a frame that's already in flight.Spec: PostHog/sdk-specs#247. Native halves: PostHog/posthog-ios#1124 and PostHog/posthog-android#1008.
This needs posthog-ios 4.2.0 and posthog-android 4.2.0, so the minimums are raised to those versions in
Package.swiftandbuild.gradle.The project setting works like setting
maskAllTextsormaskAllImagesto true insessionReplayConfig. When atextMaskPolicyis set, it still decides which text gets masked.💚 How did you test it?
flutter testinposthog_flutterpasses, including new tests for native-only masking flags, for dropping frames captured before a flag reset, and for a flag that turns on between capture and send.flutter analyzeanddart formatare clean.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
DRI: @ioannisj
Autonomy: Human-driven (agent-assisted)