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
F18509352: D19118.id.diff
Fri, Sep 5, 3:22 AM
F18502201: D19118.diff
Thu, Sep 4, 10:16 PM
F18192468: D19118.id45812.diff
Sun, Aug 17, 4:13 AM
F18190669: D19118.diff
Sun, Aug 17, 1:18 AM
F18099712: D19118.id45810.diff
Aug 9 2025, 8:02 AM
F18077295: D19118.id.diff
Aug 4 2025, 7:00 PM
F18051928: D19118.id.diff
Aug 4 2025, 12:44 AM
F18049163: D19118.diff
Aug 3 2025, 3:38 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.