-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Feature Request]: ability to mask attributes #1581
Comments
Are these attributes visible anywhere during replay? |
In PostHog (at least) you can view the DOM at any point using an "inspect DOM" tool, and more generally using dev tools in the browser. For someone very safety conscious it means they can't avoid storing PII in a third party system. Since they can only scrub select parts of the DOM. We've added a Much like the |
I'm also thinking that assuming these are non-display, and aren't used by CSS to alter display, they should be tackled by the |
So I don't think Had your user already used either of the |
Preflight Checklist
What package is this feature request for?
rrweb
Problem Description
see https://posthog.com/questions/scrubbing-html-attributes-from-dom-in-session-recordings
where a customer asks us for the ability to mask the content of an element's attribute - in that case
aria-label
might contain PII and they'd like to ensure it isn't capturedwe can mask an element's text or an input's value
i believe it isn't possible to mask an element's attribute
Proposed Solution
addition of a function
maskElement(element: Element) => Element | null
this would run ahead of other processing of a node and let you carry out arbitrary masking
for this case you could iterate and mask attributes
in practice it lets you carry out arbitrary alteration of the element
Alternatives Considered
if arbitrary alterations of the captured element are undesirable
then add a
maskAttributes(attributes: SomeType[]) => SomeType[] | null
Additional Information
No response
The text was updated successfully, but these errors were encountered: