Skip to content

[Regression] Normal users can't use /webex, /math, and slash commands #16187

@wreiske

Description

@wreiske

Description:

After updating to 2.4.0 normal users see "Error" when using slash commands like /webex, /math, etc.

Steps to reproduce:

  1. Upgrade to 2.4.0
  2. Install Math or WebEx from the app marketplace
  3. Type /math 2+2 or /webex as a normal (non-admin) user

Expected behavior:

Return results from the slash command as normal.

Actual behavior:

image

Server logs show:


I20200109-10:14:40.384(-5) server.js:204 System ➔ error Error sending message: Error: You are not authorized to change message properties
at validateUserIdentity (app/lib/server/functions/sendMessage.js:164:9)
at sendMessage (app/lib/server/functions/sendMessage.js:174:2)
at MethodInvocation.sendMessage (app/lib/server/methods/sendMessage.js:86:11)
at MethodInvocation.methodsMap.(anonymous function) (app/lib/server/lib/debug.js:67:34)
at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:1689:15)
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at resolve (packages/ddp-server/livedata_server.js:1687:36)
at new Promise (<anonymous>)
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 DDPCommon.MethodInvocation.Meteor.runAsUser (app/api/server/v1/chat.js:175:59)
at packages/dispatch_run-as-user.js:211:14
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)
at Object.post (app/api/server/v1/chat.js:175:23)
at DDP._CurrentInvocation.withValue (app/api/server/api.js:343:82)
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at Object._internalRouteActionHandler [as action] (app/api/server/api.js:343: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 

Apps engine logs:

[
  "{\"stack\":\"TypeError: Cannot read property '_id' of undefined
    at Promise.asyncApply (app/apps/server/bridges/messages.js:22:14)
    at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40\",\"message\":\"Cannot read property '_id' of undefined\"}"
]

image

Server Setup Information:

  • Version of Rocket.Chat Server: 2.4.0 (097c7c0)

Client Setup Information

  • Desktop App or Browser Version:
  • Operating System:

Additional context

Probably related to f7f6bd0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions