Verification email garbles the user's name when a dot is followed by a digit

Aperta
#44,120 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Taru-Sharma0503 ci sta già lavorando.

Dal 3/12/2026.

  • #44121 di @Taru-Sharma0503 — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Start with apps/meteor/lib/utils/safeHtmlDots.ts and find its unit tests. Check how safeHtmlDots handles a dot followed by a digit, then add the suggested complete numeric reference and a regression test for a name such as Bot 2.0. Done means the verification greeting preserves the one-dot-leader and the following digit, with the relevant unit test passing.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type: bug

Description:
The email-verification message greets the user with Hi [name] (default Verification_Email template). Before substitution, the name goes through safeHtmlDots (apps/meteor/lib/utils/safeHtmlDots.ts), which replaces every . with &#8228 — a numeric character reference without the terminating ;.

Browsers and mail clients read a numeric reference up to the last consecutive digit, so when a dot is followed by a digit, that digit is absorbed into the code point. A name like Bot 2.0 becomes Bot 2&#82280, which renders as Bot 2𔅨 (U+14168): the dot and the 0 are replaced by an unrelated glyph. The same goes for [fname] / [lname], which are derived from the already-processed name.

Dots followed by letters (J.Smith) still render, but only because HTML parsers tolerate the missing ; (a parse error per the HTML spec).

Steps to reproduce:
With SMTP configured, enable the Accounts_EmailVerification setting (Administration → Settings → Accounts).
Register a user whose name contains a dot followed by a digit, e.g. Bot 2.0 or Release 9.1 Bot.
Open the verification email.
Equivalent minimal check: open an HTML page containing Bot 2&#82280 (what safeHtmlDots('Bot 2.0') returns).

Expected behavior:
The greeting reads Hi Bot 2․0 (dot still shown as the one-dot-leader that keeps mail clients from auto-linking it).

Actual behavior:
The greeting reads Hi Bot 2𔅨.

Server Setup Information:
Version of Rocket.Chat Server: develop @ 9211f6ccd3 (code unchanged since 2023)
Additional context
Suggested fix: emit the complete reference, ․, in safeHtmlDots, with a unit test covering a dot followed by a digit.

Lingua principale
TypeScript
Stelle
46.6k
Fork
14.2k
Merge medio
2g 21h
PR unite (30g)
302

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/Rocket.Chat

Tutte le issue di RocketChat/Rocket.Chat

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.