Page MenuHomePhabricator

Remove autodetection for whether links need "noreferrer"
ClosedPublic

Authored by epriestley on Feb 18 2018, 1:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 7:09 PM
Unknown Object (File)
Thu, Dec 19, 7:09 PM
Unknown Object (File)
Thu, Dec 19, 7:09 PM
Unknown Object (File)
Thu, Dec 12, 6:28 PM
Unknown Object (File)
Tue, Dec 10, 4:43 PM
Unknown Object (File)
Tue, Dec 10, 1:29 AM
Unknown Object (File)
Fri, Dec 6, 11:55 PM
Unknown Object (File)
Fri, Dec 6, 7:18 AM
Subscribers
None

Details

Summary

Via HackerOne. See https://hackerone.com/reports/317243.

We're still detecting these wrong because browsers treat <a href=" /<newline><tab>\evil.com">click here</a> as a valid protocol-relative link to evil.com.

Just give up and add "noreferrer" at the application level at all callsites, like we do with target="_blank" already.

Test Plan

Added failing tests; ran unit tests. See also next change.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable