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
F18834697: D19118.id.diff
Sun, Oct 26, 10:17 AM
F18783837: D19118.id45810.diff
Mon, Oct 13, 9:55 AM
F18769318: D19118.diff
Wed, Oct 8, 7:11 AM
F18672997: D19118.id45812.diff
Sep 25 2025, 8:59 AM
F18657948: D19118.diff
Sep 23 2025, 4:12 AM
F18630978: D19118.diff
Sep 16 2025, 1:50 PM
F18611379: D19118.diff
Sep 14 2025, 7:05 AM
F18596484: D19118.id45810.diff
Sep 13 2025, 12:48 AM
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.