Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions flutter/lib/src/sentry_privacy_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ class SentryPrivacyOptions {
mask: false,
name: 'SentryUnmask',
));
// TODO: check for Flutter version and make this testable
rules.add(SentryMaskingCustomRule<Widget>(
callback: (Element element, Widget widget) {
dynamic dynWidget = widget;
try {
final sensitivity = dynWidget.sensitivity;
assert(sensitivity is Enum);
return SentryMaskingDecision.mask;
} catch (e) {
return SentryMaskingDecision.continueProcessing;
}
},
name: 'SensitiveContent',
description: 'Mask SensitiveContent'));

// Then, we apply apply rules based on the configuration.
if (maskAllImages) {
Expand Down
Loading