-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix for [Bug]: hidden inputs are not masked when maskAllInputs is enabled #1609 #1745
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
Conversation
⚠️ No Changeset found
Latest commit: 7ce7796
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
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.
Pull Request Overview
This PR fixes a bug where hidden input fields were not properly masked when the maskAllInputs option is enabled in rrweb. The fix ensures that hidden inputs are included in the default masking behavior for security purposes.
Key changes:
- Added
hidden: trueto the default mask input options whenmaskAllInputsis enabled - Updated the
MaskInputOptionstype to include ahiddenfield - Added test coverage with a hidden input field in the test HTML
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/rrweb/src/record/index.ts | Adds hidden: true to default mask options when maskAllInputs is enabled |
| packages/rrweb-snapshot/src/types.ts | Extends MaskInputOptions type to include hidden boolean field |
| packages/rrweb-snapshot/src/snapshot.ts | Adds hidden: true to default mask options in snapshot function |
| packages/rrweb/test/html/form.html | Adds hidden input field to test form for validation |
| packages/rrweb/test/snapshots/integration.test.ts.snap | Updates test snapshots to reflect hidden input masking behavior |
| packages/rrweb/test/record/snapshots/cross-origin-iframes.test.ts.snap | Updates cross-origin iframe test snapshots |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
re-implementing a critical fix from #1610 to have a fresh CI result and bump priority (thank you @ababik !)
linked issue: #1609