Skip to content

fix(message-parser): link addresses under the private-use .internal domain - #43124

Open
mrityunjay-pandey wants to merge 1 commit into
RocketChat:developfrom
mrityunjay-pandey:fix/autolink-internal-domains
Open

mrityunjay-pandey wants to merge 1 commit into
RocketChat:developfrom
mrityunjay-pandey:fix/autolink-internal-domains

Conversation

@mrityunjay-pandey

@mrityunjay-pandey mrityunjay-pandey commented Oct 25, 2026 •

Copy link
Copy Markdown

Closes #32688

Proposed changes

The message parser only auto-links hosts whose suffix is on the public suffix list, plus localhost and the domains listed in Message_CustomDomain_AutoLink. ICANN reserved .internal for private networks in 2024, so it will never be on that list, and addresses like https://wiki.corp.internal/page rendered as plain text, even with an explicit scheme.

  • autoLink (packages/message-parser/src/utils.ts) now treats internal as a valid host by default, the same way it already treats localhost.
  • Other unknown suffixes are unchanged (https://internaltool.testt still isn't linked), and Message_CustomDomain_AutoLink works as before.

Steps to test or reproduce

  1. Send https://wiki.corp.internal/page and wiki.internal in any room.
  2. Before: both show as plain text. After: both are links.

Tests

tests/url.test.ts: the two .internal cases fail on develop and pass with this change. All 734 message-parser tests pass.

Summary by CodeRabbit

  • Bug Fixes
    • Links to .internal addresses now render as links instead of plain text.

@changeset-bot

changeset-bot Bot commented Oct 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fda3b20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@rocket.chat/message-parser Patch
@rocket.chat/meteor Patch
@rocket.chat/core-services Patch
@rocket.chat/core-typings Patch
@rocket.chat/gazzodown-alt Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/rest-typings Patch
@rocket.chat/streamer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dionisio-bot

dionisio-bot Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 78053889-4cfd-4cd4-9e9a-6c07500aa23d
Commits

Reviewing files that changed from the base of the PR and between 1826a86 and fda3b20.

Files selected for processing: 3
  • .changeset/internal-links-autolink.md
  • packages/message-parser/src/utils.ts
  • packages/message-parser/tests/url.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Recent review details
Additional comments: 3
packages/message-parser/src/utils.ts: 1

86-87: LGTM!

Also applies to: 98-98

packages/message-parser/tests/url.test.ts: 1

149-156: LGTM!

.changeset/internal-links-autolink.md: 1

1-5: LGTM!

Walkthrough

The message parser now recognizes .internal hosts during automatic link parsing. Tests cover an HTTPS URL with a path and a protocol-less host. A patch changeset records the fix.

Changes

Internal host autolinking

Layer / File(s) Summary
Recognize .internal hosts for auto-linking
packages/message-parser/src/utils.ts, packages/message-parser/tests/url.test.ts, .changeset/internal-links-autolink.md
The valid-host list now includes .internal alongside localhost. Tests check HTTPS and protocol-less .internal URLs. A patch changeset records the fix.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested labels: type: bug

Suggested reviewers: ggazzo, tassoevan

Merge Risk: Minimal · up to fda3b

The change is limited to the intended .internal autolinking behavior and is ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: linking addresses under the private-use .internal domain in message-parser.
Linked Issues check Passed Issue #32688 requires websites ending in .internal to render as clickable hyperlinks. autoLink adds internal to privateUseHosts, and the existing host validation accepts it. The new tests cove…
Out of Scope Changes check Passed The changeset documents the fix. The source change implements .internal host recognition. The tests verify the linked issue behavior and preserve the unknown-suffix boundary. These changes support i…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Linked Issues check

Explanation

Issue #32688 requires websites ending in .internal to render as clickable hyperlinks. autoLink adds internal to privateUseHosts, and the existing host validation accepts it. The new tests cover https://wiki.corp.internal/page and wiki.internal and expect LINK nodes. The implementation also keeps the existing unknown-suffix test for https://internaltool.testt unchanged.

Full details: Out of Scope Changes check

Explanation

The changeset documents the fix. The source change implements .internal host recognition. The tests verify the linked issue behavior and preserve the unknown-suffix boundary. These changes support issue #32688 and do not show unrelated scope.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Errors were encountered while retrieving linked issues.

Errors: 1
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

".internal" websites are not rendered

1 participant