From 740fbba96165ea806f2b5be462c3bb7c090e2169 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 8 Apr 2014 05:14:15 -0700 Subject: [PATCH] Add meta referrer tag to all pages Summary: Ref T4342. Puts meta="referrer" on everything. Test Plan: In Safari, used the Charles http proxy to verify this change actually stops referrers from being sent. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4342 Differential Revision: https://secure.phabricator.com/D8712 --- src/view/page/PhabricatorBarePageView.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/view/page/PhabricatorBarePageView.php b/src/view/page/PhabricatorBarePageView.php index 2f0e23eb7c..2519226509 100644 --- a/src/view/page/PhabricatorBarePageView.php +++ b/src/view/page/PhabricatorBarePageView.php @@ -89,14 +89,22 @@ class PhabricatorBarePageView extends AphrontPageView { 'content' => 'black-translucent' )); + $referrer_tag = phutil_tag( + 'meta', + array( + 'name' => 'referrer', + 'content' => 'never', + )); + $response = CelerityAPI::getStaticResourceResponse(); $developer = PhabricatorEnv::getEnvConfig('phabricator.developer-mode'); return hsprintf( - '%s%s%s%s%s', + '%s%s%s%s%s%s', $viewport_tag, $icon_tag, $apple_tag, + $referrer_tag, CelerityStaticResourceResponse::renderInlineScript( $framebust.jsprintf('window.__DEV__=%d;', ($developer ? 1 : 0))), $response->renderResourcesOfType('css'));