Bug 1339669 - Update security.mixed_content.hsts_priming_cache_timeout default r?mayhemer draft
authorKate McKinley <kmckinley@mozilla.com>
Thu, 16 Feb 2017 10:48:59 +0900
changeset 485060 748be2f9e4d64903b047e0ae2066537753151429
parent 485058 36663347138dc227d190bdec9b469821058cf176
child 545912 dc507b832654affe181e3196b54b57b0a4406e50
push id45614
push userbmo:kmckinley@mozilla.com
push dateThu, 16 Feb 2017 01:52:56 +0000
reviewersmayhemer
bugs1339669
milestone54.0a1
Bug 1339669 - Update security.mixed_content.hsts_priming_cache_timeout default r?mayhemer MozReview-Commit-ID: CNFrPUyrdO8
dom/security/nsMixedContentBlocker.cpp
modules/libpref/init/all.js
security/manager/ssl/security-prefs.js
--- a/dom/security/nsMixedContentBlocker.cpp
+++ b/dom/security/nsMixedContentBlocker.cpp
@@ -56,17 +56,17 @@ bool nsMixedContentBlocker::sBlockMixedS
 // Is mixed display content blocking (images, audio, video, <a ping>) enabled?
 bool nsMixedContentBlocker::sBlockMixedDisplay = false;
 
 // Do we move HSTS before mixed-content
 bool nsMixedContentBlocker::sUseHSTS = false;
 // Do we send an HSTS priming request
 bool nsMixedContentBlocker::sSendHSTSPriming = false;
 // Default HSTS Priming failure timeout to 7 days, in seconds
-uint32_t nsMixedContentBlocker::sHSTSPrimingCacheTimeout = (60 * 24 * 7);
+uint32_t nsMixedContentBlocker::sHSTSPrimingCacheTimeout = (60 * 60 * 24 * 7);
 
 bool
 IsEligibleForHSTSPriming(nsIURI* aContentLocation) {
   bool isHttpScheme = false;
   nsresult rv = aContentLocation->SchemeIs("http", &isHttpScheme);
   NS_ENSURE_SUCCESS(rv, false);
   if (!isHttpScheme) {
     return false;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5556,17 +5556,17 @@ pref("security.mixed_content.send_hsts_p
 pref("security.mixed_content.use_hsts", false);
 #else
 // Change the order of evaluation so HSTS upgrades happen before
 // mixed-content blocking
 pref("security.mixed_content.send_hsts_priming", true);
 pref("security.mixed_content.use_hsts", true);
 #endif
 // Approximately 1 week default cache for HSTS priming failures, in seconds
-pref ("security.mixed_content.hsts_priming_cache_timeout", 10080);
+pref ("security.mixed_content.hsts_priming_cache_timeout", 604800);
 // Force the channel to timeout in 3 seconds if we have not received
 // expects a time in milliseconds
 pref ("security.mixed_content.hsts_priming_request_timeout", 3000);
 
 // If true, data: URIs inherit the principal (security context) of the parent.
 // If false, data: URIs use a NullPrincipal as the security context.
 pref ("security.data_uri.inherit_security_context", true);
 
--- a/security/manager/ssl/security-prefs.js
+++ b/security/manager/ssl/security-prefs.js
@@ -117,12 +117,12 @@ pref("security.mixed_content.send_hsts_p
 pref("security.mixed_content.use_hsts", false);
 #else
 // Change the order of evaluation so HSTS upgrades happen before
 // mixed-content blocking
 pref("security.mixed_content.send_hsts_priming", true);
 pref("security.mixed_content.use_hsts", true);
 #endif
 // Approximately 1 week default cache for HSTS priming failures, in seconds
-pref ("security.mixed_content.hsts_priming_cache_timeout", 10080);
+pref ("security.mixed_content.hsts_priming_cache_timeout", 604800);
 // Force the channel to timeout in 3 seconds if we have not received
 // expects a time in milliseconds
 pref ("security.mixed_content.hsts_priming_request_timeout", 3000);