-
-
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
Mask value attribute changes for elements in maskInputOptions #602
Conversation
src/utils.ts
Outdated
|
||
// TODO: move me to rrweb-snapshot | ||
// we are doing similar things there as well, would be best to keep things consistent | ||
export function maskInputValue({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to move this code now? I can release a new version of rrweb-snapshot when this gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm out of office all day today, earliest I can do this would be about 24 hours from now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can merge this PR and I can follow up with a cleanup PR that moves this to rrweb-snapshot tomorrow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Juice10 Let me understand this better. If someone use React to build an input component and sync the value to DOM attribute:
Am I right? |
@Yuyz0112 correct! |
@Juice10 Please upgrade to rrweb-snapshot@1.1.6, thanks! |
LGTM |
I noticed that some frameworks keep the contents of their form fields in sync with their value attributes.
Since we were not filtering mutations to value attributes for sensitive fields, that means that passwords and other masked information could leak into rrweb events.
This PR masks attribute mutations on value attributes for masked input fields.