From c4214a7ee9ca41cc09652b65a0340ed67dc1cedd Mon Sep 17 00:00:00 2001 From: sebastiaan Date: Thu, 9 Aug 2012 14:04:49 -0200 Subject: [PATCH] The version header is no longer needed and a potential attack vector. Has now been removed - Work item: 30989 --- src/umbraco.businesslogic/UmbracoSettings.cs | 22 ------------------- .../config/umbracoSettings.Release.config | 2 -- src/umbraco.presentation/default.aspx.cs | 4 ---- 3 files changed, 28 deletions(-) diff --git a/src/umbraco.businesslogic/UmbracoSettings.cs b/src/umbraco.businesslogic/UmbracoSettings.cs index f032f89fd3..7a38b42823 100644 --- a/src/umbraco.businesslogic/UmbracoSettings.cs +++ b/src/umbraco.businesslogic/UmbracoSettings.cs @@ -311,28 +311,6 @@ namespace umbraco } } - /// - /// Gets a value indicating whether umbraco shouldn't add X-Umbraco-Version to the http header. - /// - /// true if umbraco will not add header; otherwise, false. - public static bool RemoveUmbracoVersionHeader - { - get - { - try - { - bool result; - if (bool.TryParse(GetKey("/settings/requestHandler/removeUmbracoVersionHeader"), out result)) - return result; - return false; - } - catch - { - return false; - } - } - } - /// /// This will add a trailing slash (/) to urls when in directory url mode /// NOTICE: This will always return false if Directory Urls in not active diff --git a/src/umbraco.presentation/config/umbracoSettings.Release.config b/src/umbraco.presentation/config/umbracoSettings.Release.config index 9b36698f97..dae69d2df4 100644 --- a/src/umbraco.presentation/config/umbracoSettings.Release.config +++ b/src/umbraco.presentation/config/umbracoSettings.Release.config @@ -124,8 +124,6 @@ ae oe - - false diff --git a/src/umbraco.presentation/default.aspx.cs b/src/umbraco.presentation/default.aspx.cs index 53b4b19dc1..b18e10c58a 100644 --- a/src/umbraco.presentation/default.aspx.cs +++ b/src/umbraco.presentation/default.aspx.cs @@ -206,10 +206,6 @@ namespace umbraco if (!UmbracoSettings.UseAspNetMasterPages) initUmbracoPage(); base.OnInit(e); - - // Add Umbraco header - if (!UmbracoSettings.RemoveUmbracoVersionHeader) - Response.AddHeader("X-Umbraco-Version", string.Format("{0}.{1}", GlobalSettings.VersionMajor, GlobalSettings.VersionMinor)); } private void initUmbracoPage()