Skip to content

Conversation

@julio-rocketchat
Copy link
Member

@julio-rocketchat julio-rocketchat commented Jun 27, 2025

Proposed changes (including videos or screenshots)

After adding a new function that sanitizes URLs and blocks the usage of dangerous protocol schemas such as javascript:, a bug was introduced. URLs without a predefined protocol will return #:

image

This PR changes that behavior to ensure that URLs without a predefined protocol will return a protocol-relative URL:

image

URLs with protocols are returned normally:

image

While dangerous protocol schemas are blocked:

image

Issue(s)

CORE-1215

Steps to test or reproduce

N/A

Further comments

N/A

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jun 27, 2025

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

  • This PR is targeting the wrong base branch. It should target 7.9.0, but it targets 7.8.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2025

🦋 Changeset detected

Latest commit: 929a56a

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

This PR includes changesets to release 36 packages
Name Type
@rocket.chat/gazzodown Patch
@rocket.chat/meteor Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/livechat Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/http-router Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status 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

@julio-rocketchat julio-rocketchat requested a review from ggazzo June 27, 2025 08:10
@github-actions
Copy link
Contributor

github-actions bot commented Jun 27, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-36317/

Built to branch gh-pages at 2025-07-01 18:26 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.78%. Comparing base (4ba5cd0) to head (929a56a).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #36317   +/-   ##
========================================
  Coverage    64.78%   64.78%           
========================================
  Files         3153     3153           
  Lines       104879   104870    -9     
  Branches     19986    19979    -7     
========================================
- Hits         67946    67943    -3     
+ Misses       34247    34234   -13     
- Partials      2686     2693    +7     
Flag Coverage Δ
e2e 57.71% <ø> (+0.03%) ⬆️
unit 69.51% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@scuciatto scuciatto added this to the 7.9.0 milestone Jun 27, 2025
@julio-rocketchat julio-rocketchat added the stat: QA assured Means it has been tested and approved by a company insider label Jul 2, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 2, 2025
@kodiakhq kodiakhq bot merged commit ba0cbd3 into develop Jul 2, 2025
89 of 91 checks passed
@kodiakhq kodiakhq bot deleted the fix-sanitzeurl branch July 2, 2025 13:20
sem22-dev pushed a commit to sem22-dev/Rocket.Chat that referenced this pull request Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants