From 26287067fc4f3083370a5c7fbb6df2049f968d27 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Feb 2019 11:51:32 +0000 Subject: [PATCH] Security: Force TURN setting was inverted In making the settings more positive, we flipped 'disable peer to peer' but didn't change the caption, so the setting was inverted from what it was labelled as. Also, forcing p2p isn't the inverse of forcing turn. Change the setting to be 'allow p2p' and the label to match. --- src/MatrixClientPeg.js | 2 +- src/components/views/settings/tabs/VoiceSettingsTab.js | 2 +- src/i18n/strings/en_EN.json | 5 ++--- src/settings/Settings.js | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index f283eb84a5..e36034c69d 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -177,7 +177,7 @@ class MatrixClientPeg { userId: creds.userId, deviceId: creds.deviceId, timelineSupport: true, - forceTURN: !SettingsStore.getValue('webRtcForcePeerToPeer', false), + forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer', false), verificationMethods: [verificationMethods.SAS] }; diff --git a/src/components/views/settings/tabs/VoiceSettingsTab.js b/src/components/views/settings/tabs/VoiceSettingsTab.js index 65f38c7841..aefb114dd3 100644 --- a/src/components/views/settings/tabs/VoiceSettingsTab.js +++ b/src/components/views/settings/tabs/VoiceSettingsTab.js @@ -174,7 +174,7 @@ export default class VoiceSettingsTab extends React.Component { {microphoneDropdown} {webcamDropdown} - + ); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 7376b35fe5..b5a6542cd7 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -292,7 +292,7 @@ "Automatically replace plain text Emoji": "Automatically replace plain text Emoji", "Mirror local video feed": "Mirror local video feed", "Enable Community Filter Panel": "Enable Community Filter Panel", - "Disable Peer-to-Peer for 1:1 calls": "Disable Peer-to-Peer for 1:1 calls", + "Allow Peer-to-Peer for 1:1 calls": "Allow Peer-to-Peer for 1:1 calls", "Send analytics data": "Send analytics data", "Never send encrypted messages to unverified devices from this device": "Never send encrypted messages to unverified devices from this device", "Never send encrypted messages to unverified devices in this room from this device": "Never send encrypted messages to unverified devices in this room from this device", @@ -1205,6 +1205,7 @@ "Quote": "Quote", "Source URL": "Source URL", "Collapse Reply Thread": "Collapse Reply Thread", + "End-to-end encryption information": "End-to-end encryption information", "Failed to set Direct Message status of room": "Failed to set Direct Message status of room", "unknown error code": "unknown error code", "Failed to forget room %(errCode)s": "Failed to forget room %(errCode)s", @@ -1475,7 +1476,6 @@ "unencrypted": "unencrypted", "Decryption error": "Decryption error", "Session ID": "Session ID", - "End-to-end encryption information": "End-to-end encryption information", "Event information": "Event information", "Sender device information": "Sender device information", "Passphrases must match": "Passphrases must match", @@ -1536,7 +1536,6 @@ "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.", "This device is encrypting history using the new recovery method.": "This device is encrypting history using the new recovery method.", "Go to Settings": "Go to Settings", - "Setting up Secure Messages on this device will re-encrypt this device's message history with the new recovery method.": "Setting up Secure Messages on this device will re-encrypt this device's message history with the new recovery method.", "Set up Secure Messages": "Set up Secure Messages", "Recovery Method Removed": "Recovery Method Removed", "This device has detected that your recovery passphrase and key for Secure Messages have been removed.": "This device has detected that your recovery passphrase and key for Secure Messages have been removed.", diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 671f46b366..9d8c3f741b 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -234,9 +234,9 @@ export const SETTINGS = { supportedLevels: ['config'], default: "dharma", }, - "webRtcForcePeerToPeer": { + "webRtcAllowPeerToPeer": { supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG, - displayName: _td('Disable Peer-to-Peer for 1:1 calls'), + displayName: _td('Allow Peer-to-Peer for 1:1 calls'), default: true, invertedSettingName: 'webRtcForceTURN', },