Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add a warning on E2EE rooms if you try to make them public #5698

Merged
merged 24 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
131f499
Add Confirm Public Encrypted Room dialog
SimonBrandner Feb 27, 2021
0d9bc00
i18n
SimonBrandner Feb 27, 2021
5d6bc9a
Add second Confirm Public Encrypted Room dialog
SimonBrandner Feb 28, 2021
5a55b0d
i18n
SimonBrandner Feb 28, 2021
2442878
Remove unnecessary async
SimonBrandner Feb 28, 2021
a6deef7
Merge branch 'develop' into public-e2ee-warn
SimonBrandner May 22, 2021
02c1378
Fix
SimonBrandner May 22, 2021
0618460
Merge remote-tracking branch 'upstream/develop' into public-e2ee-warn
SimonBrandner Jul 12, 2021
c478b4e
Improve "Are you sure you want to make this encrypted room public?" d…
SimonBrandner Jul 12, 2021
90ecdac
Types!
SimonBrandner Jul 12, 2021
0e4ea97
Add defaultEncrypted prop
SimonBrandner Jul 13, 2021
d7acaa9
Update onEncryptionChange dialog
SimonBrandner Jul 13, 2021
82e0bce
Remove unnecessary code
SimonBrandner Jul 13, 2021
e445c9c
Merge remote-tracking branch 'upstream/develop' into public-e2ee-warn
SimonBrandner Jul 28, 2021
9ec4507
Update copy
SimonBrandner Jul 28, 2021
168a329
Remove additional word
SimonBrandner Jul 28, 2021
e076282
Fix typo
SimonBrandner Jul 28, 2021
717691e
Remove spaces
SimonBrandner Aug 6, 2021
67062da
Remove spaces
SimonBrandner Aug 6, 2021
94f915a
Remove spaces
SimonBrandner Aug 6, 2021
1e9437d
Use correct character
SimonBrandner Aug 6, 2021
3abc419
Remove spaces and use correct character
SimonBrandner Aug 6, 2021
6e688b3
Merge remote-tracking branch 'upstream/develop' into public-e2ee-warn
SimonBrandner Aug 6, 2021
1b8aae9
i18n
SimonBrandner Aug 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default class SecurityRoomSettingsTab extends React.Component {
});
};

_onRoomAccessRadioToggle = (roomAccess) => {
_setRoomAccess = (roomAccess) => {
// join_rule
// INVITE | PUBLIC
// ----------------------+----------------
Expand Down Expand Up @@ -191,6 +191,29 @@ export default class SecurityRoomSettingsTab extends React.Component {
console.error(e);
this.setState({guestAccess: beforeGuestAccess});
});
}

_onRoomAccessRadioToggle = async (roomAccess) => {
if (
this.state.encrypted &&
this.state.joinRule != "public" &&
roomAccess != "invite_only"
) {
Modal.createTrackedDialog('Confirm Public Encrypted Room', '', QuestionDialog, {
title: _t('Confirm making this room public?'),
description: _t(
"Making end-to-end encrypted rooms public renders the " +
"encryption pointless, wastes processing power, and can cause " +
"performance problems. Please consider creating a separate " +
"unencrypted public room.",
SimonBrandner marked this conversation as resolved.
Show resolved Hide resolved
),
onFinished: (confirm) => {
if (confirm) this._setRoomAccess(roomAccess);
},
});
} else {
this._setRoomAccess(roomAccess);
}
};

_onHistoryRadioToggle = (history) => {
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,8 @@
"Select the roles required to change various parts of the room": "Select the roles required to change various parts of the room",
"Enable encryption?": "Enable encryption?",
"Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>": "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",
"Confirm making this room public?": "Confirm making this room public?",
"Making end-to-end encrypted rooms public renders the encryption pointless, wastes processing power, and can cause performance problems. Please consider creating a separate unencrypted public room.": "Making end-to-end encrypted rooms public renders the encryption pointless, wastes processing power, and can cause performance problems. Please consider creating a separate unencrypted public room.",
"Guests cannot join this room even if explicitly invited.": "Guests cannot join this room even if explicitly invited.",
"Click here to fix": "Click here to fix",
"To link to this room, please add an address.": "To link to this room, please add an address.",
Expand Down