rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

Fix maskInputFn is ignored during the creation of the full snapshot

Open ababik opened this issue 1 year ago • 1 comments

Fix for https://github.com/rrweb-io/rrweb/issues/1385

ababik avatar Jan 04 '24 20:01 ababik

🦋 Changeset detected

Latest commit: c44b56c45ff35f21b312d5122c36c07d68b385d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
rrweb-snapshot Patch
rrweb Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/web-extension Patch
rrvideo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jan 04 '24 20:01 changeset-bot[bot]

@ababik I saw the tests are failing. Any plans to fix them? I'm happy to help.

lewgordon-amplitude avatar Jun 03 '24 16:06 lewgordon-amplitude

@Juice10 was this just a copy/paste error on your part do you recall?

(referring to https://github.com/rrweb-io/rrweb-snapshot/pull/83/files#diff-0151af937db3d4d81e0883cfa20e4370c007c43b72afeb1e55a9058b4276df37R36 )

eoghanmurray avatar Jun 04 '24 11:06 eoghanmurray

For some context:

  • maskInputFn was added first in #409
  • maskTextFn was added subsequently in #540 (motivated by #502)

At that point rrweb-snapshot was a separate repository. (I was trying to find out if there was ever an intention for one to fallback to the other if one is defined and the other is not, but I can't see that ever being the case)

The default versions of these two functions are slightly different in that the maskTextFn doesn't replace whitespace in the content with '*' (stars), so preserves information about the original text, whereas maskInputFn replaces the entire value with stars (like a password field). Both preserve the length of the original content.

eoghanmurray avatar Jun 06 '24 22:06 eoghanmurray

Any updates on this one? It looks like it's pretty much good to go?

lewgordon-amplitude avatar Jun 13 '24 16:06 lewgordon-amplitude