Skip to content

Commit

Permalink
chore!: Update default E2EE settings behavior (#33361)
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-rajpal authored and ggazzo committed Oct 17, 2024
1 parent 6aa8136 commit 2ab24f4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/swift-penguins-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': major
---

Change the E2EE setting - "Access unencrypted content in encrypted rooms" default value, making the current behavior not allow to send unencrypted messages in end-to-end encrypted channels.
2 changes: 1 addition & 1 deletion apps/meteor/server/settings/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const createE2ESettings = () =>
alert: 'E2E_Enable_alert',
});

await this.add('E2E_Allow_Unencrypted_Messages', true, {
await this.add('E2E_Allow_Unencrypted_Messages', false, {
type: 'boolean',
public: true,
enableQuery: { _id: 'E2E_Enable', value: true },
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/server/startup/migrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ import './v310';
import './v311';
import './v312';
import './v313';
import './v314';

export * from './xrun';
21 changes: 21 additions & 0 deletions apps/meteor/server/startup/migrations/v314.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Settings } from '@rocket.chat/models';

import { addMigration } from '../../lib/migrations';

addMigration({
version: 314,
name: 'Update default behavior of E2E_Allow_Unencrypted_Messages setting, to not allow un-encrypted messages by default.',
async up() {
await Settings.updateOne(
{
_id: 'E2E_Allow_Unencrypted_Messages',
},
{
$set: {
value: false,
packageValue: false,
},
},
);
},
});

0 comments on commit 2ab24f4

Please sign in to comment.