✨ add new privacy rule for autocomplete password value #3094
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
Motivation
There are multiple ways to hide an element from RUM Session Replay (documentation):
data-dd-privacy="allow" | "mask" | "hidden" | "mask-user-input"
class="dd-privacy-allow" | "dd-privacy-mask-user-input" | "dd-privacy-mask" | "dd-privacy-hidden"
By default, some HTML elements are automatically masked:
However, this doesn't currently handle new-password and current-password autocomplete attributes.
Why isn't
type="password"
sufficient?This is mainly due to password visibility toggle components, where libraries and custom code temporarily change the input type from
password
totext
to show the password, then revert it back topassword
.Changes
I have updated the condition for
autocomplete
attributes using the same logic ascc-
prefixes.My main question is whether we should use an
endsWith
logic? This would match the currentcc-
implementation, or we could be more explicit:Can you update the documentation too?
Testing
I have gone over the contributing documentation.