Mark copied secret custom fields as sensitive - #170
Merged
hegocre merged 1 commit intoJul 11, 2026
Conversation
Secret custom fields are masked in the details view just like the account password, but their value was copied to the clipboard without the sensitive flag. On Android 13+ this let the value appear in the clipboard preview and be retained in clipboard history. Add CustomField.isSensitive (true only for secret fields) and use it at the custom-field copy actions, so secret fields are flagged with ClipDescription.EXTRA_IS_SENSITIVE like the password field already is. Assisted-by: ClaudeCode:claude-opus-4-8 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Secret custom fields are masked in the details view (●●●, shield icon, reveal toggle) exactly like the account password. But copying such a field put its value on the clipboard without the sensitive flag, whereas the password field is already copied with
isSensitive = true.On Android 13+ this means a secret custom field's value could:
Change
CustomField.isSensitive(true only forTYPE_SECRET).PasswordItem, so secret fields are copied withClipDescription.EXTRA_IS_SENSITIVE, consistent with the password field. Non-secret fields (text / email / url) keep their previous behaviour (not flagged).Tests
CustomFieldTest(JVM unit test) coveringisSensitivefor every field type../gradlew testDebugUnitTest --tests "*CustomFieldTest"→ 3 passed, 0 failed../gradlew assembleDebugsucceeds.On-device visual check of the clipboard preview still recommended.
Disclosure: this change was prepared with AI assistance (Claude Code - Opus 4.8 xhigh) and reviewed by me before submission.