Richard Pospesel pushed to branch tor-browser-102.6.0esr-12.0-1 at The Tor Project / Applications / Tor Browser
Commits: be0f1dcb by Henry Wilkes at 2023-01-11T17:22:14+00:00 fixup! Bug 40209: Implement Basic Crypto Safety
Bug 41539: Remove all whitespace from copied text before testing if it looks like a crypto address.
(cherry picked from commit 221b7a494351e853bae3aa4878573829e7f7015a) - - - - -
1 changed file:
- browser/actors/CryptoSafetyChild.jsm
Changes:
===================================== browser/actors/CryptoSafetyChild.jsm ===================================== @@ -74,7 +74,7 @@ class CryptoSafetyChild extends JSWindowActorChild {
if (event.type == "copy" || event.type == "cut") { this.contentWindow.navigator.clipboard.readText().then(clipText => { - const selection = clipText.trim(); + const selection = clipText.replace(/\s+/g, ""); if (looksLikeCryptoAddress(selection)) { this.sendAsyncMessage("CryptoSafety:CopiedText", { selection,
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/be0f1dcb...
tbb-commits@lists.torproject.org