Page MenuHomePhabricator

Explicitly add rel="noreferrer" to all external links
ClosedPublic

Authored by epriestley on Feb 18 2018, 1:43 AM.
Tags
None
Referenced Files
F19804296: D19118.id45812.diff
Mar 2 2026, 6:42 AM
F19767602: D19118.id45812.diff
Feb 19 2026, 4:32 PM
F19759091: D19118.diff
Feb 18 2026, 1:12 AM
F19637894: D19118.id45812.diff
Feb 5 2026, 3:27 PM
F19637539: D19118.id45810.diff
Feb 5 2026, 2:33 PM
F19388161: D19118.diff
Dec 27 2025, 4:08 AM
F18855813: D19118.id.diff
Nov 1 2025, 6:53 AM
F18840020: D19118.diff
Oct 27 2025, 8:36 PM
Subscribers
Restricted Owners Package

Details

Summary

See D19117. Instead of automatically figuring this out inside phutil_tag(), explicitly add rel="noreferrer" at the application level to all external links.

Test Plan
  • Grepped for _blank, isValidRemoteURIForLink, checked all callsites for user-controlled data.
  • Created a link menu item, verified noreferrer in markup.
  • Created a link custom field, verified no referrer in markup.
  • Verified noreferrer for {nav href=...}.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a subscriber: Restricted Owners Package.Feb 18 2018, 1:43 AM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 18 2018, 1:44 AM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.
src/applications/files/markup/PhabricatorImageRemarkupRule.php
23

This was rendering <img href="..." /> which has no effect since href doesn't go on img.