brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.85k stars 2.33k forks source link

Copy/Paste Issue #41064

Closed Komanachi closed 1 month ago

Komanachi commented 1 month ago

Description

When I copy some of my passwords via icon on the webui, the characters on the copied password coverts to the lower letters. I mean, I cannot copy and paste original password. If I make the password visible and then copy it manually via Ctrl + C or right click, I can paste it as original state without changing the letters.

The problem occurs on vault.bitwarden.com copy function via icon. I tried different browsers and there is no any problem.

Device: Apple M2 Max OS: Sonoma 14.6.1 Brave: 2024.9.0

This problem that I face has started 10 or 12 days ago. Before that, there was no any issue. The problem occurs only one password that included ":", "^", and ",". For others, the characters stay same as expected. But for this password, let's say the password is "ASDASD:asd^ASD,ASD". When I manually copy the password there is no problem. But if I use the automatic copy function via icon on the website, it is converted to "asdasd:asd^ASD,ASD".

On the developer tools > console there is no any error. It's hard to explain the issue. I hope it's clear.

Steps to reproduce

  1. go vault.bitwarden.com
  2. create a password ASDASD:asd^ASD,ASD
  3. then copy it via copying icon
  4. paste it somewhere and you will get the result like asdasd:asd^ASD,ASD

Actual result

asdasd:asd^ASD,ASD

Expected result

ASDASD:asd^ASD,ASD

Reproduces how often

Easily reproduced

Brave 1.69.168 Chromium: 128.0.6613.138 (Official Build) (arm64)
Revision 6918a99aa67f8b2c8cfdc9a44e6ad4f9be6c5be9
OS macOS Version 14.6.1 (Build 23G93)
JavaScript V8 12.8.374.31
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Command Line /Applications/Brave Browser.app/Contents/MacOS/Brave Browser --disable-domain-reliability --enable-dom-distiller --enable-distillability-service --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --lso-url=https://no-thanks.invalid --sync-url=https://sync-v2.brave.com/v2 --variations-server-url=https://variations.brave.com/seed --variations-insecure-server-url=https://variations.brave.com/seed --flag-switches-begin --flag-switches-end --component-updater=url-source=https://go-updater.brave.com/extensions
Executable Path /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
Profile Path /Users/melihkarasu/Library/Application Support/BraveSoftware/Brave-Browser/Profile 3
Linker lld
Active Variations main@91b8a9d0e33034f2368c6ed2015474b1d818a902AllowCertainClientHintsStudy:EnabledBraveAIChatEnabledStudy:EnabledBraveAdblockMobileNotificationsListDefault:EnabledBraveAdsAdEventStudy:EnabledBraveAdsConversionsStudy:EnabledBraveAdsExclusionRulesStudy:EnabledBraveAdsNewTabPageAdsStudy:EnabledBraveAdsSiteVisitStudy:EnabledBraveAdsTextClassificationPageProbabilitiesStudy:EnabledBraveAggressiveModeRetirementExperiment:DisabledBraveAutoTranslateStudy:AutoTranslateDisabledBraveCleanupSessionCookiesOnSessionRestore:DisabledBraveDebounceStudy:EnabledBraveFeedUpdateStudy:EnabledBraveForgetFirstPartyStorage:EnabledBraveGoogleSignInPermissionStudy:EnabledBraveHorizontalTabsUpdateEnabledStudy:EnabledBraveP3AConstellationEnabled:EnabledBraveP3ANebulaRelease:EnabledBraveP3ATypicalJSONDeprecationEnabled:EnabledBraveRewardsAllowSelfCustodyProvidersStudy:EnabledBraveRewardsWebUiPanelStudy:EnabledBraveScreenFingerprintingBlockerStudy:EnabledBraveSearchAdStudy:EnabledBraveWalletAnkrBalancesEnabled:DefaultBraveWebcompatExceptionsServiceReleaseStudy:EnabledClampPlatformVersionClientHint:DisabledCookieListDefaultStudy:EnabledCrossPlatformVPNStudy:EnabledDefault1pBlockingStudy:DisabledDisableReduceLanguage:EnabledEphemeralStorageStudy:EnabledExtensionsManifestV2StudyRelease:EnabledMacCoreLocationBackendStudy:EnabledPartitionedCookies:EnabledSpeedreader TTS:EnabledUndecryptablePasswords:EnabledUserActivityStudy:TriggersWhatsNewStudy:Enabled


a

Channel information

Reproducibility

Miscellaneous information

No response

fmarier commented 1 month ago

I was able to reproduce in Brave (1.70.107 on Linux) but not in Chrome using this minimal test case: https://fmarier.github.io/brave-testing/clipboard.html

Here are a list of test cases, only the first one is lowercasing the A:

but only when copying to the clipboard using the JS API. The keyboard shortcut Ctrl+c works as expected.

fmarier commented 1 month ago

The fact that it works as expected in Chrome suggests to me that we're doing something weird with the clipboard.

The only thing I can think of is https://github.com/brave/brave-browser/issues/33037, but that feature is only supposed to be active on a small number of sites.

cc @boocmp

fmarier commented 1 month ago

Another test case from https://community.brave.com/t/text-changes-when-using-clipboard-writetext/566397

fmarier commented 1 month ago

It does like like it's related to copy-clean-link because it can also be reproduced right here by:

  1. Selecting https://www.abc.com/<br>abc in the comment above.
  2. Right-clicking on the selection.
  3. Choosing "copy clean link"
  4. Pasting in a new comment here
fmarier commented 1 month ago

Looks like there's two problems here:

  1. copy-clean-link is doing something weird when detecting URLs.
  2. copy-clean-link is active when it's not supposed to.
kjozwiak commented 1 month ago

The above requires 1.70.119 or higher for 1.70.x verification 👍

srirambv commented 1 month ago

Verification passed on

Brave 1.70.119 Chromium: 129.0.6668.70 (Official Build) (arm64)
Revision a15c836a4df987f118ece1645f54b081019049de
OS macOS Version 15.0 (Build 24A335)

https://github.com/user-attachments/assets/ff3b1409-1ede-40fb-89b3-9619169eea68

GeetaSarvadnya commented 1 month ago

Verification PASSED on

Brave | 1.70.119 Chromium: 129.0.6668.70 (Official Build) (64-bit)
-- | --
Revision | a15c836a4df987f118ece1645f54b081019049de
OS | Windows 10 Version 22H2 (Build 19045.4894)

Verified the description from the issue https://github.com/brave/brave-browser/issues/41064#issue-2525717014 ensured that the correct text/strings/links were being copied as per the following:

copypaste issue

btlechowski commented 1 month ago

Verified with

Brave 1.70.119 Chromium: 129.0.6668.70 (Official Build) (64-bit)
Revision a15c836a4df987f118ece1645f54b081019049de
OS Linux

Reproduced the original issue using 1.70.117 with the STR/Cases outlined via https://github.com/brave/brave-browser/issues/41064#issue-2525717014 & https://fmarier.github.io/brave-testing/clipboard.html.

Verified fixed on 1.70.119

35965_1 35965_2