Commit graph

343 commits

Author SHA1 Message Date
David Baker
8b8eb7d3c0
Merge pull request #4580 from matrix-org/dbkr/dont_npe_if_no_device
Avoid soft crash if unknown device in verification
2020-05-12 14:36:54 +01:00
David Baker
ae2645b69b Provide separate translatable for case where we have no device 2020-05-12 12:42:16 +01:00
David Baker
3c5c7f56f3 Adjust comment 2020-05-12 11:14:05 +01:00
David Baker
5c0920da42 Avoid soft crash if unknown device in verification
Rageshakes from the wild indicate that device was null here which
implies that we somehow did not know about the device when verifiying
it? Log and null-check to avoid a soft crash.
2020-05-12 11:05:30 +01:00
Michael Telatynski
c0061e2f2a Don't try and redact redactions for "Remove recent messages"
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-11 16:39:14 +01:00
David Baker
719faed2ff Separate toasts for existing & new device verification
Separate device verification toasts into ones for devices that were
there when the app loaded and a separate toast for each device that
has appeared since.

Reverts part of https://github.com/matrix-org/matrix-react-sdk/pull/4506
(clicking a device from your own UserInfo now triggers the legacy
verification flow again).

Fixes https://github.com/vector-im/riot-web/issues/13422
Fixes https://github.com/vector-im/riot-web/issues/13418
2020-04-28 18:35:16 +01:00
David Baker
4dca66d140 No need for this if statement now 2020-04-28 09:43:24 +01:00
David Baker
ff1fd15e72 Use the New Session review dialog for verifying our own devices 2020-04-27 20:31:14 +01:00
Bruno Windels
b8dd68dda2 wait until cross-signing keys are fetched to show verify button 2020-04-21 18:36:15 +02:00
Travis Ralston
e72008d7f1 Fix end-to-end tests for end-to-end encryption verification
Fixes https://github.com/vector-im/riot-web/issues/13226

This isn't the fastest route, but it is a predictable route for the happy path we probably want to test. For example, Alice will already be staring at the DM and could easily accept the verification there, but we probably want to make sure that the toast is present and does the right thing. Similarly, neither of them need to verify that there's green shields everywhere, they should be implied, however an explicit check follows a real user's gaze.
2020-04-17 14:31:33 -06:00
Travis Ralston
b4e2daaf46 Convert cross-signing feature flag to setting
This is intended as a temporary measure until we're comfortable with removing the flag entirely.
2020-04-15 13:18:42 -06:00
Michael Telatynski
712e6e8c49 Fix sas verification buttons to match figma and remove useless inDialog prop from EncryptionPanel.js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-07 19:03:12 +01:00
Michael Telatynski
fe401ce4da
Merge branch 'develop' into t3chguy/xsigning/fix_userinfo_e2eicon 2020-04-03 18:38:30 +01:00
Bruno Windels
cdbd4da0e4 adjust copy for self-verification in verification panel 2020-04-03 17:04:29 +02:00
Bruno Windels
030d594e67 for self-verif, mention which device, not user we're verifying in panel 2020-04-03 17:03:37 +02:00
Bruno Windels
2ee780caa2 pass isSelf flag to sas component 2020-04-02 18:28:14 +02:00
Bruno Windels
cc9c5cabb3 adapt encryption info to self-verification
- hide text when shown in a dialog
 - adapt "waiting for ... to accept" text to self-verif
2020-04-02 17:51:25 +02:00
Bruno Windels
081baa2359 set dialog title for self-verification
use request.isSelfVerification helper
2020-04-02 17:51:06 +02:00
Bruno Windels
1baaafe7b9 some comments to explain the mess 2020-04-02 16:44:42 +02:00
Bruno Windels
0307361fa2 more polish for self-verification 2020-04-02 16:42:39 +02:00
Bruno Windels
1f65cfb7f6 polish design and disable buttons after click 2020-04-02 13:44:19 +02:00
Bruno Windels
ccf6c9efdc fixup: more i18n 2020-04-02 13:44:19 +02:00
Bruno Windels
119fd2f519 fixup: these are actually on the verifier 2020-04-02 13:44:19 +02:00
Bruno Windels
00b1afe0fa first go at reciprocate UX 2020-04-02 13:44:19 +02:00
Bruno Windels
1353ddaa96 move qr code data generation to js-sdk 2020-04-02 13:41:19 +02:00
Travis Ralston
59a99bbad8
Merge pull request #4313 from matrix-org/travis/react-warnings/1-componentDidMount
Use componentDidMount in place of componentWillMount where possible
2020-04-01 11:13:04 -06:00
Michael Telatynski
0d8fd83e4d move aria-label and title so that it doesn't wrap the e2e icon
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-01 17:16:28 +01:00
Michael Telatynski
4a4a13ac75 Fix UserInfo e2e buttons to match Figma
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-01 12:21:18 +01:00
Travis Ralston
3f99332f4b Use componentDidMount in place of componentWillMount where possible
This fixes a common React warning we see. Most of these components should be using constructors instead, however componentDidMount is just as good (and doesn't require converting most of these).

Conversion to classes will be done in a later stage of React warning fixes.

For https://github.com/vector-im/riot-web/issues/12877
2020-03-31 14:14:17 -06:00
Michael Telatynski
eb901441cd Fix alignment of e2e icon in userinfo and expose full displayname in title
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-31 16:14:18 +01:00
J. Ryan Stinnett
37619dd127 Show red shield for users that become unverified
For any users that we previously verified but that are not unverified, we will
now mark them and rooms they are in with a red shield.

Fixes https://github.com/vector-im/riot-web/issues/12808
2020-03-28 00:21:18 +00:00
Michael Telatynski
cf4f595f79
Merge pull request #4289 from matrix-org/t3chguy/userInfo_avatar
blank out UserInfo avatar when changing between members
2020-03-27 10:21:53 +00:00
Michael Telatynski
a974f0fe46 blank out UserInfo avatar when changing between members
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-27 09:59:18 +00:00
Bruno Windels
a6fbb98252 only show close button when not in a dialog, which already has one 2020-03-26 17:02:32 +01:00
Bruno Windels
34b0c1b1e7 fix lint & other cleanup 2020-03-26 16:54:31 +01:00
Bruno Windels
9b54d15fcd add cancel button to verification panel 2020-03-26 16:53:46 +01:00
Michael Telatynski
7ca6a4b777 Iterate copy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-25 23:00:46 +00:00
Michael Telatynski
be3167c870 always show Devices section
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-25 22:44:09 +00:00
Michael Telatynski
d098c91c30 Update cross-signing verification copy and fix i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-25 22:38:11 +00:00
Bruno Windels
301b484371 ask request if method is supported rather than checking ourselves 2020-03-20 13:37:00 +01:00
Bruno Windels
ddbfe4e1fa enable 4S if needed when trying to verify 2020-03-10 16:31:40 +01:00
Bruno Windels
1f9bd55f3b revert to legacy user verification (over to_device) without xsign keys 2020-03-06 17:37:01 +01:00
Bruno Windels
7d051d6a1d await request promise inside encryption panel to show spinner 2020-03-05 17:44:35 +01:00
Bruno Windels
a5cd0a7d5f indent by 4 spaces 2020-03-05 11:09:45 +01:00
Bruno Windels
8a964dbff0 avoid ref by getting count in setter callback 2020-03-04 17:19:54 +01:00
Bruno Windels
afc7273d10 use pendingUpdateCount rather, so we don't show multiple spinners 2020-03-04 16:58:04 +01:00
Bruno Windels
29af8add5d only show verify button if user has uploaded cross-signing keys 2020-03-04 16:10:06 +01:00
Bruno Windels
400cb33247 put state declaration on top 2020-02-27 12:35:34 +01:00
Bruno Windels
50b64d8c55 add local echo for clicking 'start verification' button 2020-02-26 18:30:20 +01:00
Bruno Windels
682781aa48 better word smithing 2020-02-25 13:27:59 +01:00
Bruno Windels
2127edb7b8 show "Waiting for network" in EncryptionInfo after accepting in toast 2020-02-25 13:13:51 +01:00
J. Ryan Stinnett
64dc776e43
Merge pull request #4118 from matrix-org/jryans/hs-xsign-check
Check for cross-signing homeserver support
2020-02-24 16:58:57 +00:00
Bruno Windels
818156663a don't leak if show_sas never comes (or already came) 2020-02-24 17:00:55 +01:00
J. Ryan Stinnett
a71a234622 Check for cross-signing homeserver support
This checks the homeserver to ensure it supports cross-signing (via the versions
feature flag) before attempting bootstrapping or offering user verification.

Fixes https://github.com/vector-im/riot-web/issues/11863
2020-02-24 15:04:34 +00:00
Bruno Windels
2350d102e3 update phase when request prop changes 2020-02-24 13:39:20 +01:00
Bruno Windels
1b38827d92
Merge pull request #4077 from matrix-org/bwindels/filterverifmethods
Only show supported verification methods
2020-02-18 10:16:01 +00:00
Bruno Windels
93674ec781
Merge pull request #4070 from matrix-org/bwindels/oneverifrequest
Find existing requests when starting a new verification request
2020-02-14 15:33:27 +00:00
Bruno Windels
30718e7fde unsent could potentially also happen here
although should not happen in practice
2020-02-14 13:48:38 +01:00
Bruno Windels
a6c072ab42 only show supported verification methods
also an error message if none match
2020-02-14 13:48:18 +01:00
Zoe
37f1104f61 lint 2020-02-13 14:15:08 +00:00
Zoe
c3af1a2f95 don't be too magic about hiding tooltips 2020-02-13 13:47:39 +00:00
Bruno Windels
4b7cc12daa check if there is already a request in progress when clicking verify
and go straight there instead of first showing EncryptionInfo panel
2020-02-13 14:34:44 +01:00
Bruno Windels
68197a1d18 also update phase after starting request
as it might now be a request that is already ongoing
2020-02-13 14:33:35 +01:00
Bruno Windels
d49fbf25f7 check if verifier sasEvent was already set on mount
this allow the verification panel to fully recover
the UI state from an on-going verification request
2020-02-13 14:32:33 +01:00
Bruno Windels
ec708b5e9b
Merge pull request #4058 from matrix-org/bwindels/dontpassmethodstoverify
remove methods arg to requestVerification(DM)
2020-02-13 08:51:36 +00:00
Zoe
e1608509d0 Disable 'start' button after clicking in VerificationPanel 2020-02-12 13:53:16 +00:00
Bruno Windels
33f3a61b94 remove unused imports 2020-02-11 18:23:05 +01:00
Bruno Windels
a1844e44f2 remove methods arg to requestVerification(DM)
as it's easy to have this argument be out of sync from all
the places this is called from the js-sdk. There is also little point,
as you can already specify the methods a consumer of the js-sdk
wants to provide through the verificationMethods option when creating
the client object.
2020-02-11 18:22:48 +01:00
Bruno Windels
7a026eb15d
Merge pull request #4043 from matrix-org/bwindels/showunverifieddevicedialogonclick
Verify single device from other user in right panel & Not Trusted dialog
2020-02-11 15:35:24 +00:00
Bruno Windels
1d39aa6a81
Merge pull request #4049 from matrix-org/bwindels/verifybuttonsdisable
Disable verification buttons after clicking to avoid double submission
2020-02-11 15:35:00 +00:00
Bruno Windels
5267dbf44a
Update src/components/views/right_panel/UserInfo.js
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2020-02-11 15:21:01 +00:00
Bruno Windels
4b8382b5c4 remove dead code 2020-02-10 17:07:02 +01:00
Bruno Windels
a693af0c6b fix lint 2020-02-10 16:19:27 +01:00
Bruno Windels
2a8453b939 i18n fixes 2020-02-10 16:19:27 +01:00
Bruno Windels
9059f00b29 move css to correct file
Move the CSS for the dialog layout used in VerificationPanel to
_VerificationPanel.scss,
and delete the latter as it doesn't have any css of it's own anymore
2020-02-10 16:19:27 +01:00
Travis Ralston
ea4d97fa73 Hack in a layout option 2020-02-10 16:19:27 +01:00
Bruno Windels
5c89b41177 make device verification go over right panel (after showing dialog)
dialog should be more or less as in the design
2020-02-07 18:36:46 +01:00
Bruno Windels
577121e88d disable "verify by emoji" after clicking it 2020-02-07 15:50:51 +01:00
Travis Ralston
724cff6a2e Update QR code rendering to support VerificationRequests
Makes for building the QR code easier and more common.
2020-01-30 17:12:44 +00:00
David Baker
8a09cfbfbd
Merge pull request #3999 from matrix-org/dbkr/user_info_black_shields
Make shields in UserInfo black if user isn't verified
2020-01-30 16:30:19 +00:00
David Baker
4f62fc16bd lint 2020-01-30 16:19:04 +00:00
David Baker
77618d30fd Actually this is green because it's a link
not because the things were verified. Use the linkButton class
2020-01-30 16:08:42 +00:00
David Baker
0956d00637 Make shields in UserInfo black if user isn't verified 2020-01-30 15:59:03 +00:00
J. Ryan Stinnett
fd5798aa87 Change verify user text 2020-01-30 13:21:51 +00:00
J. Ryan Stinnett
eaa48665d2 Guard request input 2020-01-29 21:59:30 +00:00
J. Ryan Stinnett
7a5bf8f102 Update user info for device and trust changes
This ensure the user info panel updates automatically for device and trust
changes.

Fixes https://github.com/vector-im/riot-web/issues/12134`
2020-01-29 21:55:29 +00:00
David Baker
ac173e9d50
Merge pull request #3984 from matrix-org/dbkr/rightpanel_verif_phase
Fix various races that prevented the right panel being in the right state for verifications
2020-01-29 18:03:27 +00:00
Bruno Windels
ad458722dc evaluate on mount whether we need to call .verify()
as the request might be in phase started already.
2020-01-29 17:58:23 +01:00
David Baker
e403169e13 Fix various races that prevented the right panel being in the right state for verifications
Fixes https://github.com/vector-im/riot-web/issues/11989
2020-01-29 16:56:12 +00:00
J. Ryan Stinnett
067bfe2ee3 Tweaks from PR 2020-01-29 16:10:46 +00:00
J. Ryan Stinnett
81ee27f41e Replace device with session in UI text
This replaces "device" with "session" throughout user-visible text at the React
layer. Variable names and comments are left as-is for now.
2020-01-29 15:52:32 +00:00
Michael Telatynski
9457520cc2
Merge pull request #3975 from matrix-org/t3chguy/right_panel_learn_more
Replace Verify button in UserInfo verification with "Learn more"
2020-01-29 15:27:46 +00:00
Bruno Windels
44bc0d9fb1 phase is a prop now 2020-01-29 15:45:36 +01:00
Bruno Windels
59dc3cfb97 update immediately, don't wait until verification is done
this can deadlock, as you can't finish the verification without the UI
2020-01-29 15:27:55 +01:00
Michael Telatynski
00dd1a4a8f Re-use existing classes to fix font-size matching
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-29 14:22:20 +00:00
Michael Telatynski
19e7c768b6 Replace Verify button in UserInfo verification with "Learn more"
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-29 14:11:50 +00:00
Michael Telatynski
957e862939 Update copy some more
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-29 13:58:02 +00:00
Michael Telatynski
a549c42022 Update copy for right panel verification
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-29 12:10:50 +00:00
Michael Telatynski
b24c7f3a04
Merge pull request #3967 from matrix-org/t3chguy/cs_verification_decoration
Right Panel Verification improvements
2020-01-29 09:46:24 +00:00
Michael Telatynski
37e568448d delint 2020-01-29 08:08:52 +00:00
Michael Telatynski
0bb423fd5a Add console log on unhandled error to track down rageshake 2020-01-29 08:00:32 +00:00
Michael Telatynski
d824145638 show as pending whilst in an empty state until told better to prevent a flash 2020-01-29 07:54:10 +00:00
Michael Telatynski
3d47e25955 improve PropTypes for better rageshakes 2020-01-29 07:53:45 +00:00
Michael Telatynski
2c973f7467
Merge pull request #3950 from matrix-org/t3chguy/cs_verification_decoration
Cross Signing Right Panel Verification Decoration
2020-01-28 23:57:48 +00:00
Michael Telatynski
5c44ff8f8a other PR iteration based on feedback 2020-01-28 23:48:00 +00:00
Michael Telatynski
7b5a8856a4 Passing refireParams actually prevented this from working 2020-01-28 22:06:04 +00:00
J. Ryan Stinnett
32cb3b8ccb onClick to separate line 2020-01-28 19:55:53 +00:00
J. Ryan Stinnett
6fb8f6eef1 Add device IDs in user info tooltips
For easier device identification, add the device ID in an HTML tooltip for now.

Fixes https://github.com/vector-im/riot-web/issues/12103
2020-01-28 18:03:51 +00:00
Michael Telatynski
58df4127d3 Update propTypes and remove todo 2020-01-28 17:14:48 +00:00
Michael Telatynski
657457c14b Apply remainder of ux 2020-01-28 11:13:09 +00:00
Michael Telatynski
db1d3c091e Error handle the no QR verif case better 2020-01-27 17:21:31 +00:00
Michael Telatynski
ca5d4d88a2 Style the QR code 2020-01-27 17:17:05 +00:00
Michael Telatynski
50b491d7e5 post merge fix 2020-01-27 15:48:19 +00:00
Travis Ralston
540a7f5c02 less duplication 2020-01-24 09:41:47 -07:00
Michael Telatynski
b67256c7c2 post-merge fix 2020-01-24 16:41:43 +00:00
Travis Ralston
91d59556db Also check for our own key ID 2020-01-24 09:37:12 -07:00
Travis Ralston
f8e0dcf264 Add null check for cross-signing info in verification panel 2020-01-24 09:33:55 -07:00
Michael Telatynski
342fcb09c4 Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into t3chguy/cs_verification_decoration
 Conflicts:
	src/components/views/right_panel/VerificationPanel.js
	src/components/views/toasts/VerificationRequestToast.js
2020-01-24 16:19:41 +00:00
Michael Telatynski
7a5e172b88 Apply a huge part of the decorations and copy 2020-01-24 16:16:46 +00:00
Travis Ralston
eb2402609a
Merge pull request #3871 from matrix-org/travis/qr-verif-rp
QR code verification
2020-01-24 08:55:40 -07:00
Michael Telatynski
210616c737 Phase 1, split out UserInfo into a generic Pane, use for EncInfo 2020-01-24 11:45:39 +00:00
Michael Telatynski
0078c2f099
Merge pull request #3914 from matrix-org/t3chguy/userinfo_scroll
Make the entire User Info scrollable, sticky close button
2020-01-24 10:22:17 +00:00
Travis Ralston
b7e680ba51 Fix key ID 2020-01-23 20:14:27 -07:00
Travis Ralston
b682e7d908 Generate a QR code for apps to scan 2020-01-23 20:05:32 -07:00
Travis Ralston
586a240e41 Don't use private keys for QR code 2020-01-23 19:29:54 -07:00
Travis Ralston
1ec746c014 Add verification with QR codes 2020-01-23 19:29:54 -07:00
Michael Telatynski
237a0ed071 Make the entire User Info scrollable, sticky close button 2020-01-23 16:09:32 +00:00
J. Ryan Stinnett
1e25b32ba3 Enable encryption in DMs with device keys
When the cross-signing lab is enabled, this changes DMs to use encryption as
long as all invited users have uploaded device keys (which we're using as a
proxy for "has some client that understands E2E").

Fixes https://github.com/vector-im/riot-web/issues/12005
2020-01-23 16:03:42 +00:00
J. Ryan Stinnett
9c0cf326c1 Only show devices and verify actions in E2EE rooms
This changes logic to only show the devices list and verify button in E2EE
rooms, matching the design.

Fixes https://github.com/vector-im/riot-web/issues/11839
2020-01-21 15:13:03 +00:00
J. Ryan Stinnett
b3d56b378e Use cross-signing verification only for own devices
The device verification checks are slightly more nuanced: we want to use
stricter cross-signing checks for your own devices to encourage everyone to
trust their devices via cross-signing so that other users can in turn trust
them.

However, for other users, it's okay to use the looser verification check that
also includes locally verified devices.
2020-01-21 12:03:52 +00:00
J. Ryan Stinnett
8a00ff7f1f Change all user info verification checks to cross-signing
This fixes some user vs. device verification confusion in user info by changing
all the verification tests to the cross-signing variant when the lab is enabled.

Fixes https://github.com/vector-im/riot-web/issues/11886
2020-01-21 11:00:40 +00:00
Bruno Windels
a73b7229a7 fix lint 2020-01-17 16:31:38 +01:00
Bruno Windels
d20db3560a fix import paths after build system refactor 2020-01-17 15:50:27 +01:00
Travis Ralston
d1fcef1211 Merge branch 'develop' into bwindels/verification-right-panel 2020-01-16 13:23:32 -07:00
Travis Ralston
cd9fc72fff Merge branch 'develop' into t3chguy/rightpanel 2020-01-16 10:04:18 -07:00
Michael Telatynski
0f61aa57ff
Apply suggestions from code review
Co-Authored-By: Travis Ralston <travpc@gmail.com>
2020-01-16 17:00:04 +00:00
Travis Ralston
5fd27a10bb Merge branch 'develop' into travis/sourcemaps 2020-01-13 11:19:41 -07:00
Michael Telatynski
9c686bf501 Fix right panel buttons highlighting
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-13 12:15:54 +00:00
Travis Ralston
fde32f13a5 [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop 2020-01-09 14:15:09 -07:00
Michael Telatynski
0a9d7f43c6 pass the correct phase params for consistency
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-09 15:51:19 +00:00
Michael Telatynski
7dfc392a2b Merge branches 'develop' and 't3chguy/rightpanel' of github.com:matrix-org/matrix-react-sdk into t3chguy/rightpanel 2020-01-09 15:48:06 +00:00
Michael Telatynski
a62c260f79 Fix userinfo for users not in the room
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-07 12:58:24 +00:00
Michael Telatynski
6a1f4c41ce
Merge pull request #3788 from matrix-org/t3chguy/user_info_non-historical
User Info fetch latest RoomMember instead of showing historical data
2020-01-06 11:25:54 +00:00
Michael Telatynski
4118faa834 When looking at a MemberInfo, clicking on MemberList should close not switch
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-05 20:31:07 +00:00
Michael Telatynski
fb754b795c Fix right panel buttons highlighting
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-05 20:30:01 +00:00
David Baker
5897c8ca7f Remove 'unverify' from UserInfoPanel
It's not in the designs and it's not a thing we can do with
cross-signing (at least not at the moment).
2020-01-03 15:00:51 +00:00
Bruno Windels
7a88a94936 fixes! 2020-01-03 13:50:13 +01:00
Bruno Windels
075e42c076 use transactionId as key for react 2020-01-03 13:50:13 +01:00
Bruno Windels
de1c3e2f83 use same style as UserInfo for sections and paragraphs 2020-01-03 13:50:13 +01:00
Bruno Windels
2dd1e93d84 show message after clicking "they match" 2020-01-03 13:50:13 +01:00