Improve error display for messages sent from insecure devices (#93)
* Add labs option to exclude unverified devices Add a labs option which will, when set, switch into the "invisible crypto" mode of refusing to send keys to, or decrypt messages from, devices that have not been signed by their owner. * DecryptionFailureBody: better error messages Improve the error messages shown for messages from insecure devices. * playwright: factor out `createSecondBotDevice` utility * Playwright test for messages from insecure devices * fixup! DecryptionFailureBody: better error messages Use compound colour tokens, and add a background colour. * fixup! DecryptionFailureBody: better error messages Use compound spacing tokens
This commit is contained in:
parent
be2c1fcf64
commit
f28f1d998f
8 changed files with 174 additions and 17 deletions
|
@ -6,12 +6,16 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { Page } from "@playwright/test";
|
||||
|
||||
import { expect, test } from "../../element-web-test";
|
||||
import { autoJoin, createSharedRoomWithUser, enableKeyBackup, logIntoElement, logOutOfElement, verify } from "./utils";
|
||||
import { Bot } from "../../pages/bot";
|
||||
import { HomeserverInstance } from "../../plugins/homeserver";
|
||||
import {
|
||||
autoJoin,
|
||||
createSecondBotDevice,
|
||||
createSharedRoomWithUser,
|
||||
enableKeyBackup,
|
||||
logIntoElement,
|
||||
logOutOfElement,
|
||||
verify,
|
||||
} from "./utils";
|
||||
|
||||
test.describe("Cryptography", function () {
|
||||
test.use({
|
||||
|
@ -296,13 +300,3 @@ test.describe("Cryptography", function () {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
async function createSecondBotDevice(page: Page, homeserver: HomeserverInstance, bob: Bot) {
|
||||
const bobSecondDevice = new Bot(page, homeserver, {
|
||||
bootstrapSecretStorage: false,
|
||||
bootstrapCrossSigning: false,
|
||||
});
|
||||
bobSecondDevice.setCredentials(await homeserver.loginUser(bob.credentials.userId, bob.credentials.password));
|
||||
await bobSecondDevice.prepareClient();
|
||||
return bobSecondDevice;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue