From 8f015618426d607bbee9997eefca365b49b0accd Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Fri, 11 Sep 2020 19:52:12 +0200 Subject: [PATCH] Release 85.0.4183.110 --- CHANGELOG.md | 4 +++ build/RELEASE | 2 +- build/bromite_patches_list.txt | 1 + ...ing-against-incognito-mode-detection.patch | 33 +++++++++++++++++++ ...ripts-for-AMP-tracking-ads-and-video.patch | 2 +- 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 build/patches/Hardening-against-incognito-mode-detection.patch diff --git a/CHANGELOG.md b/CHANGELOG.md index 71775f4f..dfe10526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 85.0.4183.110 +* hardening against incognito mode detection +* fix background playback issue (fixes https://github.com/bromite/bromite/issues/734) + # 85.0.4183.94 * disable the DIAL repeating discovery * removed patch for session-only cookies support diff --git a/build/RELEASE b/build/RELEASE index 89c8323b..c881835f 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -85.0.4183.94 +85.0.4183.110 diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index bb9402f0..47f8e38e 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -150,3 +150,4 @@ Disable-the-DIAL-repeating-discovery.patch Timezone-customization.patch Block-all-connection-requests-with-qjz9zk-in-the-domain-name-or-with-a-trk-scheme.patch Automated-domain-substitution.patch +Hardening-against-incognito-mode-detection.patch diff --git a/build/patches/Hardening-against-incognito-mode-detection.patch b/build/patches/Hardening-against-incognito-mode-detection.patch new file mode 100644 index 00000000..d3c21504 --- /dev/null +++ b/build/patches/Hardening-against-incognito-mode-detection.patch @@ -0,0 +1,33 @@ +From: csagan5 <32685696+csagan5@users.noreply.github.com> +Date: Sat, 5 Sep 2020 21:38:15 +0200 +Subject: Hardening against incognito mode detection + +--- + storage/browser/quota/quota_features.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/storage/browser/quota/quota_features.cc b/storage/browser/quota/quota_features.cc +--- a/storage/browser/quota/quota_features.cc ++++ b/storage/browser/quota/quota_features.cc +@@ -27,15 +27,15 @@ const base::Feature kQuotaUnlimitedPoolSize{"QuotaUnlimitedPoolSize", + // IncognitoDynamicQuota enables dynamic assignment of quota to incognito mode + // based on the physical memory size and removes the fixed upper cap for it. + const base::Feature kIncognitoDynamicQuota{"IncognitoDynamicQuota", +- base::FEATURE_DISABLED_BY_DEFAULT}; ++ base::FEATURE_ENABLED_BY_DEFAULT}; + + // Dynamic quota for incognito mode would be set by a random fraction of + // physical memory, between |IncognitoQuotaRatioLowerBound| and + // |IncognitoQuotaRatioUpperBound|. + constexpr base::FeatureParam kIncognitoQuotaRatioLowerBound{ +- &kIncognitoDynamicQuota, "IncognitoQuotaRatioLowerBound", 0.1}; ++ &kIncognitoDynamicQuota, "IncognitoQuotaRatioLowerBound", 0.15}; + constexpr base::FeatureParam kIncognitoQuotaRatioUpperBound{ +- &kIncognitoDynamicQuota, "IncognitoQuotaRatioUpperBound", 0.2}; ++ &kIncognitoDynamicQuota, "IncognitoQuotaRatioUpperBound", 0.3}; + + } // namespace features + } // namespace storage +-- +2.17.1 + diff --git a/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch b/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch index e904a268..f305d38a 100644 --- a/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch +++ b/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch @@ -155,7 +155,7 @@ new file mode 100644 +#ifndef video_bg_play_h +#define video_bg_play_h + -+#define VIDEO_BG_PLAY_JS "'use strict';\n\nconst IS_YOUTUBE = window.location.hostname.search(/(?:^|.+\\.)youtube.com/) > -1 ||\n window.location.hostname.search(/(?:^|.+\\.)youtube-nocookie.com/) > -1;\nconst IS_MOBILE_YOUTUBE = window.location.hostname == 'm.youtube.com';\nconst IS_VIMEO = window.location.hostname.search(/(?:^|.+\\.)vimeo.com/) > -1;\n\n/* video background play fix - based on https://github.com/mozilla/video-bg-play */\ndocument.wrappedJSObject = {};\n\n// Page Visibility API\nObject.defineProperties(document.wrappedJSObject,\n { 'hidden': {value: false}, 'visibilityState': {value: 'visible'} });\n\nwindow.addEventListener(\n 'visibilitychange', evt => evt.stopImmediatePropagation(), true);\n\n// Fullscreen API\nif (IS_VIMEO) {\n window.addEventListener(\n 'fullscreenchange', evt => evt.stopImmediatePropagation(), true);\n}\n\n// User activity tracking\nif (IS_YOUTUBE) {\n const refreshInterval = 2 + 3 * 60 * 1000; // every 3 minutes\n waitForYoutubeLactInit(() => refreshLact(), refreshInterval);\n}\n\nfunction waitForYoutubeLactInit(aCallback, aCallbackInterval, aDelay) {\n let pageWin = document.wrappedJSObject;\n if (pageWin.hasOwnProperty('_lact')) {\n window.setInterval(aCallback, aCallbackInterval);\n } else {\n window.setTimeout(() => waitForYoutubeLactInit(aCallback,\n aCallbackInterval,\n aDelay * 2),\n aDelay);\n }\n}\n\nfunction refreshLact() {\n document.wrappedJSObject._lact = Date.now();\n}\n" ++#define VIDEO_BG_PLAY_JS "'use strict';\n\nconst IS_YOUTUBE = window.location.hostname.search(/(?:^|.+\\.)youtube.com/) > -1 ||\n window.location.hostname.search(/(?:^|.+\\.)youtube-nocookie.com/) > -1;\nconst IS_MOBILE_YOUTUBE = window.location.hostname == 'm.youtube.com';\nconst IS_VIMEO = window.location.hostname.search(/(?:^|.+\\.)vimeo.com/) > -1;\n\n/* video background play fix - based on https://github.com/mozilla/video-bg-play */\ndocument.wrappedJSObject = {};\n\n// Page Visibility API\nObject.defineProperties(document.wrappedJSObject,\n { 'hidden': {value: false}, 'visibilityState': {value: 'visible'} });\n\nwindow.addEventListener(\n 'visibilitychange', evt => evt.stopImmediatePropagation(), true);\n\n// Fullscreen API\nif (IS_VIMEO) {\n window.addEventListener(\n 'fullscreenchange', evt => evt.stopImmediatePropagation(), true);\n}\n\nfunction activityRefresh() {\n if (window.hasOwnProperty('_lact')) {\n window._lact = Date.now();\n }\n window.setTimeout(activityRefresh, 3100 + Math.round(Math.random()*9000));\n}\n\n// User activity tracking\nif (IS_YOUTUBE) {\n window.setTimeout(activityRefresh, 2000 + Math.round(Math.random()*2000));\n}\n" + +#endif // video_bg_play_h diff --git a/third_party/blink/renderer/core/html/html_script_element.cc b/third_party/blink/renderer/core/html/html_script_element.cc