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:
@@ -377,3 +377,14 @@ export async function awaitVerifier(
|
||||
return verificationRequest.verifier;
|
||||
});
|
||||
}
|
||||
|
||||
/** Log in a second device for the given bot user */
|
||||
export 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user