RocketChat / RocketChat/Rocket.Chat
Transcribe From: e-mail regexp does not support TLD-s longer than 4 char
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 transcript From: email gets parts cut off or mail is not sent when TLD should be longer than 4 char (like .casino, .luxury, .photo, .photography, .consulting, etc)
Part is getting cut off from something like rocketchat@subdomain.dmn.photo and ends up being rocketchat@subdomain.dmn
The regexp to check the e-mail does not support for TLD-s that can be longer than 4 characters due to this issue it cuts off the last part of "From: " if using something like subdomain.domain.photo.
Steps to reproduce:
- Set up e-mail with longer than 4 char TLD
- Send transcript
- Check From: address
Expected behavior:
Full From: address in e-mail headers
Actual behavior:
TLD is being cut off if domain part is short like 3-4 char.
Server Setup Information:
Server info irrelevant, as issue is in code base from it's creation commit.
- Version of Rocket.Chat Server: 3.14.1
- Operating System: Debian 11
- Deployment Method: https://docs.rocket.chat/installing-and-updating/manual-installation/debian
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 12.18.4 - x64
- MongoDB Version:4.4.6
- MongoDB Engine: wiredTiger
- Commit Hash: 6bfd1ac9c9
- Commit Branch: HEAD
Client Setup Information
Client info irrelevant, as issue is in code base from it's creation commit.
- Desktop App or Browser Version: Firefox 88.0.1, Opera 76.0.4017.123, Chrome (Latest), Mac Desktop app, Windows Desktop app
- Operating System: Windows 10 / ArchLinux / MacOS Big Sur
Additional context
Errors located here in regexp!
https://github.com/RocketChat/Rocket.Chat/blob/157b882d38b34b7b79dea527316554fe33f70891/app/livechat/server/lib/Livechat.js#L994
https://github.com/RocketChat/Rocket.Chat/blob/develop/app/livechat/server/lib/Livechat.js#L997
https://github.com/RocketChat/Rocket.Chat/blob/develop/app/livechat/server/lib/Livechat.js#L1082
Relevant logs:
N/A
It is code error, location pointed out to you above.
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
Inspect the e-mail regexp in app/livechat/server/lib/Livechat.js around lines 997 and 1082. Reproduce the transcript with an address such as rocketchat@subdomain.dmn.photo and verify that the completed change preserves the full address in the From header for TLDs longer than four characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100