Skip to content

Commit

Permalink
Don't record value attribute on password inputs (#32)
Browse files Browse the repository at this point in the history
* Don't record password

* v0.10.2
  • Loading branch information
John Pham authored Mar 31, 2021
1 parent 5b93dac commit 6720495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@highlight-run/rrweb",
"version": "0.10.1",
"version": "0.10.2",
"description": "record and replay the web",
"scripts": {
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/snapshot/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ function serializeNode(
) {
attributes.value =
maskInputOptions[attributes.type as keyof MaskInputOptions] ||
maskInputOptions[tagName as keyof MaskInputOptions]
maskInputOptions[tagName as keyof MaskInputOptions] ||
attributes.type === 'password'
? '*'.repeat(value.length)
: value;
} else if ((n as HTMLInputElement).checked) {
Expand Down

0 comments on commit 6720495

Please sign in to comment.