From 8459adb18de61a8dd5c4ceb72a3cdea2100864da Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 10 Jul 2019 11:26:09 -0600 Subject: [PATCH 1/5] Use the state variable for the password when deactivating The Field is controlled, so we should be using the state. Otherwise the value is undefined, which means we don't supply the required auth. Fixes https://github.com/vector-im/riot-web/issues/10302 Regressed in https://github.com/matrix-org/matrix-react-sdk/pull/3071 --- src/components/views/dialogs/DeactivateAccountDialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/DeactivateAccountDialog.js b/src/components/views/dialogs/DeactivateAccountDialog.js index e9f38ef27c..cdb5950313 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.js +++ b/src/components/views/dialogs/DeactivateAccountDialog.js @@ -64,13 +64,13 @@ export default class DeactivateAccountDialog extends React.Component { const auth = { type: 'm.login.password', user: MatrixClientPeg.get().credentials.userId, - password: this._passwordField.value, + password: this.state.password, }; await MatrixClientPeg.get().deactivateAccount(auth, this.state.shouldErase); } catch (err) { let errStr = _t('Unknown error'); // https://matrix.org/jira/browse/SYN-744 - if (err.httpStatus == 401 || err.httpStatus == 403) { + if (err.httpStatus === 401 || err.httpStatus === 403) { errStr = _t('Incorrect password'); Velocity(this._passwordField, "callout.shake", 300); } From c34128dae65288fbd0efa6670f1cfb079ec8d644 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 11 Jul 2019 10:40:14 +0100 Subject: [PATCH 2/5] Upgrade to JS SDK 2.1.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68a1b13a1e..7275d095f9 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.13.1", "lolex": "2.3.2", - "matrix-js-sdk": "2.1.0", + "matrix-js-sdk": "2.1.1", "optimist": "^0.6.1", "pako": "^1.0.5", "png-chunks-extract": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 09d3ae60d7..b525fbc1ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4877,10 +4877,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.0.tgz#490b70e062ee24636536e3d9481e333733d00f2c" integrity sha512-3Zs9P/0zzwTob2pdgT0CHZuMbnSUSp8MB1bddfm+HDmnFWHGT4jvEZRf+2RuPoa+cjdn/z25SEt5gFTqdhvJAg== -matrix-js-sdk@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.1.0.tgz#a8192d700e4d96028cdb64f3453935292e76faaf" - integrity sha512-fVgqxp9rrcGhQ9cnU2WW3KJCOIn/WJu/G2tTgWEtzeDkUl22JXiB6iYfrJO7XF8nm8W5DbJVtxWRRnV8BvWatQ== +matrix-js-sdk@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.1.1.tgz#c4d9ed81e18e2c2fce9fff168fdf41f37c390b6a" + integrity sha512-dpVuwrQjOJn8eqtP9TRoSX6WIbdZG7+RCmqkJtfvpjB+iNgtDhodIWfrNearSBhJYezipUFu9nrt9akKfWBXxQ== dependencies: another-json "^0.2.0" babel-runtime "^6.26.0" From cc1d3aae4b43164cfc7eb3a3142bb9fb59bf1797 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 11 Jul 2019 10:52:18 +0100 Subject: [PATCH 3/5] Upgrade lodash --- package.json | 2 +- yarn.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 7275d095f9..4c31299342 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "is-ip": "^2.0.0", "isomorphic-fetch": "^2.2.1", "linkifyjs": "^2.1.6", - "lodash": "^4.13.1", + "lodash": "^4.17.14", "lolex": "2.3.2", "matrix-js-sdk": "2.1.1", "optimist": "^0.6.1", diff --git a/yarn.lock b/yarn.lock index b525fbc1ce..5dd06707ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4701,9 +4701,9 @@ locate-path@^3.0.0: path-exists "^3.0.0" lodash-es@^4.2.1: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.11.tgz#145ab4a7ac5c5e52a3531fb4f310255a152b4be0" - integrity sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q== + version "4.17.14" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.14.tgz#12a95a963cc5955683cee3b74e85458954f37ecc" + integrity sha512-7zchRrGa8UZXjD/4ivUWP1867jDkhzTG2c/uj739utSd7O/pFFdxspCemIFKEEjErbcqRzn8nKnGsi7mvTgRPA== lodash.clonedeep@^4.5.0: version "4.5.0" @@ -4731,14 +4731,14 @@ lodash.isstring@^4.0.1: integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= lodash.mergewith@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" + integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== -lodash@^4.1.1, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.2.1: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== +lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.4, lodash@^4.2.1: + version "4.17.14" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" + integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== log-symbols@^2.0.0, log-symbols@^2.2.0: version "2.2.0" From fe8cf242671d87e1ff9b6f9755065da527556641 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Thu, 11 Jul 2019 11:03:47 +0100 Subject: [PATCH 4/5] Prepare changelog for v1.3.1 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fd5522d8d..3523db17b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Changes in [1.3.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.3.1) (2019-07-11) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.3.0...v1.3.1) + + * Fix account deactivation + [\#3201](https://github.com/matrix-org/matrix-react-sdk/pull/3201) + * Upgrade lodash dependencies + * Upgrade to JS SDK 2.1.1 + Changes in [1.3.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.3.0) (2019-07-08) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.3.0-rc.1...v1.3.0) From 1184e05ea7d5d40a0973cdf7ae6392017e7cbb46 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Thu, 11 Jul 2019 11:03:47 +0100 Subject: [PATCH 5/5] v1.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c31299342..555e21f90e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "1.3.0", + "version": "1.3.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": {