RocketChat / RocketChat/Rocket.Chat
Generated discussion invitation link doesn't work for RC hosted in sub-directory
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
The invite URL generated from a discussion is incorrect. (URls below have been decoded for clarity.)
Steps to reproduce:
- go to a discussion
- click the Members List
- click Invite Users
- copy the generated link
- paste the link in a new tab
- 404 is shown because URL has "chat/" in it twice
Expected behavior:
URL should not include the sub-directory in the path parameter, and should be: https://go.rocket.chat/?host=www.mysite.net/chat&path=invite/LTrzj3
Actual behavior:
URL generated is https://go.rocket.chat/?host=www.mysite.net/chat&path=chat/invite/LTrzj3 (path starts with chat/, which is redundant).
Server Setup Information:
- Version of Rocket.Chat Server: 2.4.1
- Operating System: RHEL7
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: enabled
- NodeJS Version: 8.17.0
- MongoDB Version: 4.0.9
Client Setup Information
- Desktop App or Browser Version: Chrome 80.0.3987.132
- Operating System: Manjaro Linux 19.0.2
Additional context
We host RC in a sub-directory and have a proxy server in front of RC. Note that changing the Site URL to "https://www.mysite.net" (removing "/chat") via the setting in Administration > General fixes this issue, but leads to another, and also I'm not sure where else this setting is used or what may break since it no longer points to the actual RC app.
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 from the discussion Members List and Invite Users flow, then trace where the go.rocket.chat invitation URL is generated. Reproduce the sub-directory setup described in the issue and verify that the generated URL keeps the host path in the host parameter while the path parameter contains only invite/LTrzj3, without a duplicated chat/ prefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100