RocketChat / RocketChat/Rocket.Chat
[REGRESSION] Malformed urls for avatar icons when hosted from a subdirectory
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When rocket chat is hosted from the /chat subdirectory. Avatar icons get requested from broken urls like:
https://my.domain/chat/chat/avatar/%40general?_dc=undefined
I.e. the subdirectory is repeated in the request URL. Seems similar to https://github.com/RocketChat/Rocket.Chat/pull/10029.
This seems to be a regression. I did not have this problem until I upgraded to 0.65.1 from 0.62.2.
Server Setup Information:
- Version of Rocket.Chat Server: 0.65.1
- Operating System: Ubuntu 14.04
- Deployment Method(snap/docker/tar/etc): tar
- Number of Running Instances: 1
- DB Replicaset Oplog: ?
- Node Version: 8.9.1
- mongoDB Version: 3.6.2
Expected behavior:
Client (web and electron) makes successful request to https://my.domain/chat/avatar/%40general?_dc=undefined.
Actual behavior:
Client (web and electron) makes failed request to https://my.domain/chat/chat/avatar/%40general?_dc=undefined.
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 the web and Electron client code that constructs avatar request URLs, reproducing the /chat subdirectory case described in the issue. Trace why the subdirectory is added twice and verify that both clients request /chat/avatar/%40general rather than /chat/chat/avatar/%40general.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100