Skip to content
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

Replay is masking text from inputs #8816

Closed
3 tasks done
dokgu opened this issue Aug 14, 2023 · 3 comments
Closed
3 tasks done

Replay is masking text from inputs #8816

dokgu opened this issue Aug 14, 2023 · 3 comments

Comments

@dokgu
Copy link

dokgu commented Aug 14, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

7.58.1

Framework Version

NextJS 13.4.9

Link to Sentry event

No response

SDK Setup

Sentry.init({
	dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

	// Adjust this value in production, or use tracesSampler for greater control
	tracesSampleRate: 1,

	// Setting this option to true will print useful information to the console while you're setting up Sentry.
	debug: false,

	replaysOnErrorSampleRate: 1.0,

	// This sets the sample rate to be 10%. You may want this to be 100% while
	// in development and sample at a lower rate in production
	replaysSessionSampleRate: 0.25,

	// You can remove this option if you're not planning to use the Sentry Session Replay feature:
	integrations: [
		new Sentry.Replay({
			// Additional Replay configuration goes in here, for example:
			maskAllText: false,
			blockAllMedia: false
		})
	],

	// Specify the environment this event belongs to
	environment: process.env.NODE_ENV,

	// Specify the release this event belongs to
	release: `${process.env.NEXT_PUBLIC_APP_NAME}-${process.env.NEXT_PUBLIC_APP_VERSION}`
});

Steps to Reproduce

  1. Initialize Sentry and specify maskAllText: false for the session replay settings
  2. Open a page with an input text box and enter some data. Throw an exception to trigger an error
  3. Look at the session replay and the text entered on the input text box is masked

Expected Result

The text on the input text box is shown as plain text.

Actual Result

The text on the input text box is masked (********).

@ziyad-elabid-nw
Copy link
Contributor

ziyad-elabid-nw commented Aug 15, 2023

I don't understand why the maskAllText is always true in recordingOptions ?
I guess this is the source of the bug !
Why it shouldn't be : options.maskAllText value ?

options

@Lms24
Copy link
Member

Lms24 commented Aug 17, 2023

Hi, the default behaviour of Replay is to mask everything except if you opt-out of some specific elements or some types of elements. So to unmask all inputs (I'd recommend being careful here w.r.t PII, depending on what users can enter) you need to set mastAllInputs: false (see our privacy configuration docs).

Let us know if this solves your issue, thanks!

@dokgu
Copy link
Author

dokgu commented Aug 17, 2023

Hi, the default behaviour of Replay is to mask everything except if you opt-out of some specific elements or some types of elements. So to unmask all inputs (I'd recommend being careful here w.r.t PII, depending on what users can enter) you need to set mastAllInputs: false (see our privacy configuration docs).

Let us know if this solves your issue, thanks!

Thank you. I was under the impression that maskAllText already did this for me. I didn't realize that there was another option for inputs. This fixed it for me. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

5 participants