From a3cefedceabaddfebee4986f5a05ca6dcbc69cad Mon Sep 17 00:00:00 2001 From: AlexeyBarabash Date: Fri, 5 Nov 2021 20:29:41 +0200 Subject: [PATCH] Uplift of #10898 (squashed) to release --- app/brave_generated_resources.grd | 7 +++++++ .../settings/brave_sync_page/brave_sync_setup.js | 11 +++++++++++ .../settings/settings_localized_strings_provider.cc | 2 ++ 3 files changed, 20 insertions(+) diff --git a/app/brave_generated_resources.grd b/app/brave_generated_resources.grd index 8016da7d2c15..76cc3fdc8ca1 100644 --- a/app/brave_generated_resources.grd +++ b/app/brave_generated_resources.grd @@ -728,6 +728,13 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U Are you sure you want to remove the selected device from the sync chain? + +Warning: this will share your Brave data, including potentially your passwords, with the device that generated these code words. + +Please double check that these code words were generated by a device that you own. + +Are you sure you want to do this? + Brave Sync has been upgraded and requires setup diff --git a/browser/resources/settings/brave_sync_page/brave_sync_setup.js b/browser/resources/settings/brave_sync_page/brave_sync_setup.js index 800c4bef1154..5f87f555f900 100644 --- a/browser/resources/settings/brave_sync_page/brave_sync_setup.js +++ b/browser/resources/settings/brave_sync_page/brave_sync_setup.js @@ -11,6 +11,7 @@ import './brave_sync_code_dialog.js'; import {Polymer, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'; import {BraveSyncBrowserProxy} from './brave_sync_browser_proxy.js'; @@ -19,6 +20,10 @@ Polymer({ _template: html`{__html_template__}`, + behaviors: [ + I18nBehavior, + ], + properties: { syncCode: { type: String, @@ -65,6 +70,12 @@ Polymer({ }, handleSyncCodeDialogDone_: function (e) { + const messageText = this.i18n('braveSyncFinalSecurityWarning') + const shouldProceed = confirm(messageText) + if (!shouldProceed) { + return; + } + this.submitSyncCode_() }, diff --git a/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc index 7f7517e9d38d..946f3d2d032c 100644 --- a/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc @@ -230,6 +230,8 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source, {"braveSyncResetConfirmation", IDS_BRAVE_SYNC_RESET_CONFIRMATION}, {"braveSyncDeleteDeviceConfirmation", IDS_BRAVE_SYNC_DELETE_DEVICE_CONFIRMATION}, + {"braveSyncFinalSecurityWarning", + IDS_BRAVE_SYNC_FINAL_SECURITY_WARNING_TEXT}, {"braveIPFS", IDS_BRAVE_IPFS_SETTINGS_SECTION}, {"braveWallet", IDS_BRAVE_WALLET_SETTINGS_SECTION}, {"braveHelpTips", IDS_SETTINGS_HELP_TIPS},