Compare commits

...

5 Commits

Author SHA1 Message Date
David Baker d764abc1d1 v0.9.2-cryptowraning.1 2018-03-26 14:11:29 +01:00
David Baker ee0f8abe71 Prepare changelog for v0.9.2-cryptowraning.1 2018-03-26 14:11:29 +01:00
David Baker b45e231968 Merge pull request #631 from matrix-org/dbkr/cryptowarning
Disable crypto if indexeddb version too new
2018-03-26 14:04:42 +01:00
David Baker c37db5ab9e Remove added whitespace 2018-03-26 13:57:37 +01:00
David Baker 77abc45489 Disable crypto if indexeddb version too new 2018-03-23 17:29:35 +00:00
4 changed files with 20 additions and 1 deletions
+7
View File
@@ -1,3 +1,10 @@
Changes in [0.9.2-cryptowraning.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.9.2-cryptowraning.1) (2018-03-26)
================================================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.9.2...v0.9.2-cryptowraning.1)
* Disable crypto if indexeddb version too new
[\#631](https://github.com/matrix-org/matrix-js-sdk/pull/631)
Changes in [0.9.2](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.9.2) (2017-12-04)
================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.9.1...v0.9.2)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "matrix-js-sdk",
"version": "0.9.2",
"version": "0.9.2-cryptowraning.1",
"description": "Matrix Client-Server SDK for Javascript",
"main": "index.js",
"scripts": {
+6
View File
@@ -108,6 +108,12 @@ utils.inherits(Crypto, EventEmitter);
* Returns a promise which resolves once the crypto module is ready for use.
*/
Crypto.prototype.init = async function() {
// XXX: Connect to the backend now so we can fail faster if the
// version is wrong
if (this._cryptoStore._connect) {
await this._cryptoStore._connect();
}
await this._olmDevice.init();
// build our device keys: these will later be uploaded
@@ -91,6 +91,12 @@ export default class IndexedDBCryptoStore {
resolve(new IndexedDBCryptoStoreBackend.Backend(db));
};
}).catch((e) => {
// Don't fall back to memory in this case: we'd end up recreating
// a new Olm account in memory and advertising new keys for the
// same device.
if (e.name == 'VersionError') {
throw e;
}
console.warn(
`unable to connect to indexeddb ${this._dbName}` +
`: falling back to in-memory store: ${e}`,