RocketChat / RocketChat/Rocket.Chat
Clear Whitelist won't disable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
If i had something in my Mail-Domain Whitelist and remove it later on, Ill get the Error that my Domain isn't on the Whitelist.
Steps to reproduce:
- Go to Accounts
- Go to Registrations
- Add something to the whitelist
- Remove it
- You cant disable the Whitelist. It will just block all domains.
Expected behavior:
It should just create the Account since the Whitelist is clear
Actual behavior:


Server Setup Information:
- Version of Rocket.Chat Server:
- Operating System: CentOS 8
- Deployment Method: tar
- Number of Running Instances: 1
- DB Replicaset Oplog: idk
- NodeJS Version: v12.21.0
- MongoDB Version: v4.0.23
Client Setup Information
- Desktop App or Browser Version: Browser
- Operating System:Pop! OS
Additional context
Relevant logs:
Browser
ui-kit version: 0.23.0
/node_modules/@rocket.chat/fuselage-ui-kit/dist/fuselage-ui-kit.production.js:1 fuselage-ui-kit version: 0.23.0
/api/v1/users.info?userId=WgJzTKJHBBRzYM2eb:1 Failed to load resource: the server responded with a status of 400 ()
b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1844 Error
at originalCallback (b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1842)
at Object.processTwoFactorError (b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1842)
at Object.o [as error] (b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1842)
at i (b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1371)
at Object.fireWith [as rejectWith] (b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1371)
at S (b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1371)
at XMLHttpRequest. (b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1371)
(anonymous) @ b4bb06d4560349ffda968b0e6959092c3420aa66.js?meteor_js_resource=true:1844
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
/api/v1/users.create:1 Failed to load resource: the server responded with a status of 400 ()
Server
I20210412-04:43:38.574(-4) Exception while invoking method saveSettings Error: TOTP Required [totp-required] at checkCodeForUser (app/2fa/server/code/index.ts:186:9) at MethodInvocation. (app/2fa/server/twoFactorRequired.ts:31:4) at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:76:34) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12) at packages/ddp-server/livedata_server.js:1689:15 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at packages/ddp-server/livedata_server.js:1687:36 at new Promise () at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12) at Server.apply (packages/ddp-server/livedata_server.js:1625:26) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9 => awaited here: at Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12) at Server.apply (packages/ddp-server/livedata_server.js:1638:22) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9
I20210412-04:43:42.460(-4) Exception while invoking method saveSettings Error: TOTP Invalid [totp-invalid] at checkCodeForUser (app/2fa/server/code/index.ts:192:9) at MethodInvocation. (app/2fa/server/twoFactorRequired.ts:16:5) at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:76:34) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12) at packages/ddp-server/livedata_server.js:1689:15 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at packages/ddp-server/livedata_server.js:1687:36 at new Promise () at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12) at Server.apply (packages/ddp-server/livedata_server.js:1625:26) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9 => awaited here: at Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12) at Server.apply (packages/ddp-server/livedata_server.js:1638:22) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9
I20210412-04:43:46.113(-4) Exception while invoking method saveSettings Error: TOTP Required [totp-required] at checkCodeForUser (app/2fa/server/code/index.ts:186:9) at MethodInvocation. (app/2fa/server/twoFactorRequired.ts:31:4) at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:76:34) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12) at packages/ddp-server/livedata_server.js:1689:15 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at packages/ddp-server/livedata_server.js:1687:36 at new Promise () at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12) at Server.apply (packages/ddp-server/livedata_server.js:1625:26) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9 => awaited here: at Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12) at Server.apply (packages/ddp-server/livedata_server.js:1638:22) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js🔢12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9
I20210412-04:43:50.699(-4) Updating process.env.MAIL_URL
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Accounts > Registrations and trace the users.create request used by the whitelist settings. Reproduce the add-then-remove flow, then follow the registration validation path to determine why an empty whitelist still blocks domains. Done means account creation succeeds after the whitelist is cleared, with a regression test covering that sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100