-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[BUG] Invite link shows Invalid or expired invite token if Registration Form is disabled #16852
Copy link
Copy link
Closed
Labels
area: ui/uxRelated to UI/UX, frontend code, accessibility, and user interactionRelated to UI/UX, frontend code, accessibility, and user interactiontriagedIssue reviewed and properly taggedIssue reviewed and properly tagged
Description
Description:
Invite link shows Invalid or expired invite token if Registration Form is in disabled state.
But after refresh (F5 in browser or CTRL+R in Electron) user gets in private chat.
Steps to reproduce:
- Go to Admin UI => Account => Registration
- Set Registration Form to Disabled
- As private channel owner generate a valid invite link
- Share that invite link with your Rocket.Chat server users
- User press link and gets Invalid or expired invite token error
- User refresh page (F5 in browser or CTRL+R in Electron) and gets in private chat
Expected behavior:
Step 5 from Steps to reproduce is error and users don't need it
Actual behavior:
Server Setup Information:
- Version of Rocket.Chat Server: 3.0.3
- Operating System: CentOS7
- Deployment Method: docker
- Number of Running Instances: 12
- DB Replicaset Oplog: Enabled
- NodeJS Version: v12.14.0
- MongoDB Version: 4.0.13
Client Setup Information
- Desktop App Version: 2.17.7
- Operating System: Windows 10
Relevant logs:
I20200312-05:22:24.382(0) API ➔ debug POST: /api/v1/validateInviteToken
I20200312-05:22:24.386(0) API ➔ debug Success { statusCode: 200, body: { valid: true, success: true } }
I20200312-05:22:24.396(0) API ➔ debug POST: /api/v1/useInviteToken
I20200312-05:22:24.408(0) Meteor ➔ method stream -> userId: null, arguments: ["notify-user","gYFnyDxfwdDom9jeR/userData",{"0":{"diff":{"_updatedAt":"2020-03-12T05:22:24.401Z","inviteToken":"2Eg3Ne"},"type":"updated"}}]
I20200312-05:22:24.409(0) Meteor ➔ method stream -> userId: null, arguments: ["notify-user","gYFnyDxfwdDom9jeR/userData",{"0":{"diff":{"_updatedAt":"2020-03-12T05:22:24.401Z","inviteToken":"2Eg3Ne"},"type":"updated"}}]
I20200312-05:22:24.419(0) API ➔ debug Success { statusCode: 200, body: { room: { rid: 'FPywz6abqTBQzp5zZ', prid: undefined, fname: 'test-invite5', name: 'test-invite5', t: 'p' }, success: true } }
I20200312-05:22:24.421(0) Integrations ➔ Outgoing WebHook.debug Execute Trigger: roomJoined
I20200312-05:22:24.422(0) Integrations ➔ Outgoing WebHook.debug Got the event arguments for the event: roomJoined { event: 'roomJoined', user: { _id: 'gYFnyDxfwdDom9jeR', createdAt: 2019-12-13T06:00:11.733Z, services: { ldap: [Object], keycloak: [Object], resume: [Object] }, username: 'karlanaat01', emails: [ [Object] ], type: 'user', status: 'online', active: true, _updatedAt: 2020-03-12T05:22:19.324Z, roles: [ 'user' ], name: '(Test1)', customFields: { Title: '', Department: '', l: '' }, ldap: true, lastLogin: 2020-03-12T05:22:19.298Z, statusConnection: 'online', utcOffset: 3, e2e: { private_key: '{"$binary":"O/fpY5CBCDzcF2m1cNSpKe0wVNMV2QpRbuUuxo2Wk7kGNFXzjdVmY9BHLxEOWP8RL3OYod6XX47AClzR+nImnF5A49ma3LS9xCagoA8HyDaUNSRXk3JW9V03bLeWM+E93LIiyJBY7isjo5RJOZU3zu0pKUePCtaJtfj3n2m5ziDV5gmrEV9B+n7BDMYzbznrAak4IZrcWlpnxEjJSt8mqNFwLx7aCGAdCe2TTL+AHvgkeRB7pI5XXpbwJrorL0luotWn2C931nxXLE4dowbRHnJlRCFwXImhz9pU5dSWt2+FtMWd41WHz2zp1a3AzsCRitVhw14k2QHxLnj/9fTtxeC9p1+wLhQOjjAj8ZcP9wNRD1GT4HXkEWdoYLDYAoWn4lt3k2dRlcrna7hfT9lKV+478C+dj5DxdQ0lzYt4mhzaE9a9NbktxUhapRunzspcBZ0evhWsd0kH2DBBlf/Ch7Kzon0GaGCXvX+Z7kkmrMvnKk8mJYK3wPKvk3TTSk4SklyLZSfWGQZx3HOKfPvt6WUeP2PEvU/ClIYKm9NFcm87LXadrT5W+ipWiQicvrknAjjRd7zRACESVmXQ1VDDOpSLHXDQvQOh1sMtp/r6ONtFdMJ0lWlSds6zNhc9MUt8fL8ksMJIX11HOjay8ZXuf69k091k6Nd2jVTpmlcaP86mxaefVqZC7QaOALKJbgmfbfFjOk99H67Op/MbIOQ645bNJ7yiQlXHyGQQMuvSvV09DVfYwPiW1lpX==skipped=="}', public_key: '{"alg":"RSA-OAEP-256","e":"AQAB","ext":true,"key_ops":["encrypt"],"kty":"RSA","n":"8HgRH_AxEXk0BCONT5_I1mqV7InbFxuaFA_Rz-uf-FRRxH4fcS7g3P_IN6cBjZWhtmg0L4nuW9rkCWeMgFjHqu7DyHIIG6Xrg7Cpr5mY-kCF_zZwwjDXO09uiVClaUAOm_WVOiPtzxq8wY9Psf81EYy0==skipped=="}' }, statusText: '', statusDefault: 'online', settings: { preferences: [Object] }, language: 'en', inviteToken: 'CPLcxd' }, room: { _id: 'FPywz6abqTBQzp5zZ', name: 'test-invite5', fname: 'test-invite5', t: 'p', msgs: 0, usersCount: 1, u: { _id: 'iodE4TwMg4i729GoH', username: 'karlanaa' }, customFields: {}, broadcast: false, encrypted: false, ts: 2020-03-12T05:22:03.529Z, ro: false, default: false, sysMes: true, _updatedAt: 2020-03-12T05:22:03.558Z } }
I20200312-05:22:24.423(0) Integrations ➔ Outgoing WebHook.debug Starting search for triggers for the room: FPywz6abqTBQzp5zZ
I20200312-05:22:24.423(0) Integrations ➔ Outgoing WebHook.debug Found 0 to iterate over and see if the match the event.
I20200312-05:22:24.446(0) Meteor ➔ method getRoomByTypeAndName -> userId: gYFnyDxfwdDom9jeR, arguments: ["p","test-invite5"]
I20200312-05:22:24.449(0) Meteor ➔ method canAccessRoom -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ","gYFnyDxfwdDom9jeR"]
I20200312-05:22:24.459(0) Meteor ➔ method loadHistory -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ",{},50,{}]
I20200312-05:22:24.460(0) Meteor ➔ method canAccessRoom -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ","gYFnyDxfwdDom9jeR"]
I20200312-05:22:24.466(0) Meteor ➔ method canAccessRoom -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ","gYFnyDxfwdDom9jeR",null]
I20200312-05:22:24.473(0) Meteor ➔ method getRoomRoles -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ"]
I20200312-05:22:25.019(0) Meteor ➔ method readMessages -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ"]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: ui/uxRelated to UI/UX, frontend code, accessibility, and user interactionRelated to UI/UX, frontend code, accessibility, and user interactiontriagedIssue reviewed and properly taggedIssue reviewed and properly tagged

