Clear browsing context name on cross site navigation or history traversal |
||||||||||||||||||
Issue descriptionChange description: Clear browsing context name on cross site navigation or history traversal. Changes to API surface: window.name will now be null after cross origin navigation when the current browsing context does not have an opener Links: https://html.spec.whatwg.org/multipage/browsers.html#resetBCName https://trac.webkit.org/changeset/209076/webkit Support in other browsers: Internet Explorer: N/A Firefox: N/A Safari: Yes
,
Mar 29 2017
,
Apr 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f936f423177349c1840be6e9b83114a844e74fa8 commit f936f423177349c1840be6e9b83114a844e74fa8 Author: andypaicu <andypaicu@chromium.org> Date: Wed Apr 05 07:15:41 2017 Added UseCounter for clearing browsing context name on cross-origin name Added a UseCounter that tracks when a browsing context-name that would have been cleared because of a main-level cross-origin navigation is accessed. Spec: https://html.spec.whatwg.org/multipage/browsers.html#resetBCName ITI: https://groups.google.com/a/chromium.org/d/msg/blink-dev/8uZDknA2Ua0/Sm33B4MPCwAJ I have tests ready for this functionality but since this is just a UseCounter the tests would not really work. BUG=706350 Review-Url: https://codereview.chromium.org/2795673002 Cr-Commit-Position: refs/heads/master@{#461997} [modify] https://crrev.com/f936f423177349c1840be6e9b83114a844e74fa8/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/f936f423177349c1840be6e9b83114a844e74fa8/third_party/WebKit/Source/core/loader/DocumentLoader.cpp [modify] https://crrev.com/f936f423177349c1840be6e9b83114a844e74fa8/third_party/WebKit/Source/core/loader/DocumentLoader.h [modify] https://crrev.com/f936f423177349c1840be6e9b83114a844e74fa8/third_party/WebKit/Source/core/page/FrameTree.cpp [modify] https://crrev.com/f936f423177349c1840be6e9b83114a844e74fa8/third_party/WebKit/Source/core/page/FrameTree.h [modify] https://crrev.com/f936f423177349c1840be6e9b83114a844e74fa8/tools/metrics/histograms/histograms.xml
,
Jun 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0ce8475aedc63ddc635d94aa2cebc7b8b07a40b3 commit 0ce8475aedc63ddc635d94aa2cebc7b8b07a40b3 Author: Andy Paicu <andypaicu@chromium.org> Date: Tue Jun 06 12:20:44 2017 Added another counter for cross origin name that will ignore no-ops Bug: 706350 Change-Id: Ib91d511d5053a8504cf2d071ff5fc51b81009b81 Reviewed-on: https://chromium-review.googlesource.com/522584 Commit-Queue: Andy Paicu <andypaicu@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#477266} [modify] https://crrev.com/0ce8475aedc63ddc635d94aa2cebc7b8b07a40b3/third_party/WebKit/Source/core/page/FrameTree.cpp [modify] https://crrev.com/0ce8475aedc63ddc635d94aa2cebc7b8b07a40b3/third_party/WebKit/public/platform/UseCounterFeature.def [modify] https://crrev.com/0ce8475aedc63ddc635d94aa2cebc7b8b07a40b3/tools/metrics/histograms/enums.xml
,
Jul 31 2017
andypaicu@: Thanks for looking at this. Do you know if we'll have to restore the name if we go back after a cross-origin navigation? I notice the following wording: "1. The current browsing context name must be stored with all the entries in the history that are associated with Document objects with the same origin as the active document and that are contiguous with the current entry. 2. If the browsing context is a top-level browsing context, but not an auxiliary browsing context, then set the browsing context's name to the empty string."
,
Aug 28 2017
andypaicu@: I saw your Blink intent for this, so friendly ping for the question in comment 5. This affects session history and restore logic, so I'm curious how much we have to preserve. For example, if we have page A1 and page A2 in history, then we go cross-origin to B1, we can reset the name. But if the user goes back to A2, does the name need to be restored so that it's visible to the contiguous A1 and A2 pages? Or is it gone forever once it has been cleared? What does Safari do here?
,
Aug 29 2017
Hi creis@, sorry that I did not reply earlier to this. Yes this will override the name after a cross-origin navigation and the spec does say we should save it so I agree it's something that should be done. I'm thinking that this change won't worsen the status quo when it comes to the name, because I doubt that A1/A2 can rely on the document name because B1 is free to do whatever it wants with the name. Modifying the history item logic to save the name is probably quite more involved than this particular patch and I would rather have it be a separate issue. I don't know what Safari does, I'll investigate.
,
Aug 29 2017
We'll need to be a bit mindful of how we store this state: historically, there have been documents with extremely long browsing context names.
,
Sep 6 2017
>window.name will now be null after cross site navigation This isn't true. If you follow the spec, window.name should not be cleared if window has an opener. "If the browsing context is a top-level browsing context, but not an auxiliary browsing context, then set the browsing context's name to the empty string."
,
Sep 8 2017
,
Sep 8 2017
That is correct, the original description was incomplete
,
Sep 8 2017
,
Sep 12 2017
This issue has been automatically relabelled type=task because type=launch-owp issues are now officially deprecated. The deprecation is because they were creating confusion about how to get launch approvals, which should be instead done via type=launch issues. We recommend this issue be used for implementation tracking (for public visibility), but if you already have an issue for that, you may mark this as duplicate. For more details see here: https://docs.google.com/document/d/1JA6RohjtZQc26bTrGoIE_bSXGXUDQz8vc6G0n_sZJ2o/edit For any questions, please contact owencm, sshruthi, larforge
,
Oct 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/57e5929e121f8f081a80a2faaf68b00552cf7e72 commit 57e5929e121f8f081a80a2faaf68b00552cf7e72 Author: Andy Paicu <andypaicu@chromium.org> Date: Thu Oct 05 13:01:32 2017 Implemented: remove browsing context name on cross origin navigation When updating the history after a cross-origin navigation, the HTML Standard says: "If the browsing context is a top-level browsing context, but not an auxiliary browsing context, then set the browsing context's name to the empty string." Currently we are not doing this which means there's potential information leak. Spec: https://html.spec.whatwg.org/multipage/browsers.html#resetBCName I2I: https://groups.google.com/a/chromium.org/d/msg/blink-dev/fhUIycdlINU/RLVEOKaNAwAJ Webkit change: https://trac.webkit.org/changeset/209076/webkit Bug: crbug.com/706350 Change-Id: I70cb3efcef06a3442ed4bf9ddd3733e24ccde19d Reviewed-on: https://chromium-review.googlesource.com/645309 Commit-Queue: Andy Paicu <andypaicu@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#506708} [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/support/window-name-navigation.sub.html [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/support/window-name-test.sub.html [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/window-name-after-cross-origin-aux-frame-navigation.sub.html [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/window-name-after-cross-origin-main-frame-navigation.sub.html [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/window-name-after-cross-origin-sub-frame-navigation.sub.html [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/window-name-after-same-origin-aux-frame-navigation.sub.html [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/window-name-after-same-origin-main-frame-navigation.sub.html [add] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/LayoutTests/external/wpt/security/window-name-after-same-origin-sub-frame-navigation.sub.html [modify] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/Source/core/loader/DocumentLoader.cpp [modify] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/Source/core/page/FrameTree.cpp [modify] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/Source/core/page/FrameTree.h [modify] https://crrev.com/57e5929e121f8f081a80a2faaf68b00552cf7e72/third_party/WebKit/public/platform/web_feature.mojom
,
Oct 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d333bed7476464825f8dbbb2ab5dcd01d690de15 commit d333bed7476464825f8dbbb2ab5dcd01d690de15 Author: Andy Paicu <andypaicu@chromium.org> Date: Mon Oct 09 11:03:17 2017 Moved over browsing context name tests into their appropriated directory The tests where implmented here: https://chromium-review.googlesource.com/c/chromium/src/+/645309 Spec: https://html.spec.whatwg.org/multipage/browsers.html#resetBCName Bug: 706350 Change-Id: I88ebebe943369f04e75b1487060ad7f42f4c0769 Reviewed-on: https://chromium-review.googlesource.com/707007 Reviewed-by: Mike West <mkwst@chromium.org> Commit-Queue: Andy Paicu <andypaicu@chromium.org> Cr-Commit-Position: refs/heads/master@{#507351} [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/support/window-name-navigation.sub.html [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/support/window-name-test.sub.html [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/window-name-after-cross-origin-aux-frame-navigation.sub.html [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/window-name-after-cross-origin-main-frame-navigation.sub.html [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/window-name-after-cross-origin-sub-frame-navigation.sub.html [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/window-name-after-same-origin-aux-frame-navigation.sub.html [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/window-name-after-same-origin-main-frame-navigation.sub.html [rename] https://crrev.com/d333bed7476464825f8dbbb2ab5dcd01d690de15/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/history-traversal/window-name-after-same-origin-sub-frame-navigation.sub.html
,
Oct 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a9d3e8b258ba21d310bf7456cd4c270e3d49e820 commit a9d3e8b258ba21d310bf7456cd4c270e3d49e820 Author: Andy Paicu <andypaicu@chromium.org> Date: Tue Oct 24 14:29:00 2017 Revert "Implemented: remove browsing context name on cross origin navigation" This reverts commit 57e5929e121f8f081a80a2faaf68b00552cf7e72. Reason for revert: There is a blocking bug for Chromebox for Meetings that this patch has introduced. While a solution is being worked out, this patch will be reverted. Original change's description: > Implemented: remove browsing context name on cross origin navigation > > When updating the history after a cross-origin navigation, the HTML > Standard says: "If the browsing context is a top-level browsing context, > but not an auxiliary browsing context, then set the browsing context's > name to the empty string." > > Currently we are not doing this which means there's potential > information leak. > > Spec: https://html.spec.whatwg.org/multipage/browsers.html#resetBCName > I2I: https://groups.google.com/a/chromium.org/d/msg/blink-dev/fhUIycdlINU/RLVEOKaNAwAJ > Webkit change: https://trac.webkit.org/changeset/209076/webkit > > Bug: crbug.com/706350 > Change-Id: I70cb3efcef06a3442ed4bf9ddd3733e24ccde19d > Reviewed-on: https://chromium-review.googlesource.com/645309 > Commit-Queue: Andy Paicu <andypaicu@chromium.org> > Reviewed-by: Mike West <mkwst@chromium.org> > Cr-Commit-Position: refs/heads/master@{#506708} TBR=mkwst@chromium.org,andypaicu@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: crbug.com/706350 Change-Id: I3dad94ddf95a9c288081be1fda7275220177d16f Reviewed-on: https://chromium-review.googlesource.com/735441 Commit-Queue: Andy Paicu <andypaicu@chromium.org> Commit-Queue: Mats Nilsson <mnilsson@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Andy Paicu <andypaicu@chromium.org> Cr-Commit-Position: refs/heads/master@{#511140} [modify] https://crrev.com/a9d3e8b258ba21d310bf7456cd4c270e3d49e820/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/a9d3e8b258ba21d310bf7456cd4c270e3d49e820/third_party/WebKit/Source/core/loader/DocumentLoader.cpp [modify] https://crrev.com/a9d3e8b258ba21d310bf7456cd4c270e3d49e820/third_party/WebKit/Source/core/page/FrameTree.cpp [modify] https://crrev.com/a9d3e8b258ba21d310bf7456cd4c270e3d49e820/third_party/WebKit/Source/core/page/FrameTree.h [modify] https://crrev.com/a9d3e8b258ba21d310bf7456cd4c270e3d49e820/third_party/WebKit/public/platform/web_feature.mojom
,
Oct 30 2017
The revert in #16 needs to be merged back to M63, since the change introduces a blocking issue for Chromebox for Meetings. See b/67925994 for details about the problem. Raising the priority to P1 until the merge is done.
,
Oct 30 2017
This bug requires manual review: Reverts referenced in bugdroid comments after merge request. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 30 2017
Please add appropriate OSs.
,
Oct 31 2017
Checked Chrome OS since that is where we need to have the revert applied, but presumably the revert will affect all OS:es. Should all OS:es be checked then? Thanks
,
Oct 31 2017
,
Nov 1 2017
,
Nov 1 2017
tovep@ I assume that that's correct so I checked all the OS'es.
,
Nov 1 2017
+gkihumba@ for M63 merge review as per comment #17 it is needed for Chromebox for meetings.
,
Nov 1 2017
,
Nov 3 2017
Please merge your change M63 branch 3239 by 4:00 PM PT Monday (11/06/17) so we can take it for next week Beta release. Thank you.
,
Nov 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6d7ad9291cd3a290b767d241ce85e1d5fb835b85 commit 6d7ad9291cd3a290b767d241ce85e1d5fb835b85 Author: Andy Paicu <andypaicu@chromium.org> Date: Mon Nov 06 08:07:59 2017 Revert "Implemented: remove browsing context name on cross origin navigation" This reverts commit 57e5929e121f8f081a80a2faaf68b00552cf7e72. Reason for revert: There is a blocking bug for Chromebox for Meetings that this patch has introduced. While a solution is being worked out, this patch will be reverted. Original change's description: > Implemented: remove browsing context name on cross origin navigation > > When updating the history after a cross-origin navigation, the HTML > Standard says: "If the browsing context is a top-level browsing context, > but not an auxiliary browsing context, then set the browsing context's > name to the empty string." > > Currently we are not doing this which means there's potential > information leak. > > Spec: https://html.spec.whatwg.org/multipage/browsers.html#resetBCName > I2I: https://groups.google.com/a/chromium.org/d/msg/blink-dev/fhUIycdlINU/RLVEOKaNAwAJ > Webkit change: https://trac.webkit.org/changeset/209076/webkit > > Bug: crbug.com/706350 > Change-Id: I70cb3efcef06a3442ed4bf9ddd3733e24ccde19d > Reviewed-on: https://chromium-review.googlesource.com/645309 > Commit-Queue: Andy Paicu <andypaicu@chromium.org> > Reviewed-by: Mike West <mkwst@chromium.org> > Cr-Commit-Position: refs/heads/master@{#506708} TBR=mkwst@chromium.org,andypaicu@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: crbug.com/706350 Change-Id: I3dad94ddf95a9c288081be1fda7275220177d16f Reviewed-on: https://chromium-review.googlesource.com/735441 Commit-Queue: Andy Paicu <andypaicu@chromium.org> Commit-Queue: Mats Nilsson <mnilsson@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Andy Paicu <andypaicu@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#511140}(cherry picked from commit a9d3e8b258ba21d310bf7456cd4c270e3d49e820) Reviewed-on: https://chromium-review.googlesource.com/750144 Cr-Commit-Position: refs/branch-heads/3239@{#380} Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578} [modify] https://crrev.com/6d7ad9291cd3a290b767d241ce85e1d5fb835b85/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/6d7ad9291cd3a290b767d241ce85e1d5fb835b85/third_party/WebKit/Source/core/loader/DocumentLoader.cpp [modify] https://crrev.com/6d7ad9291cd3a290b767d241ce85e1d5fb835b85/third_party/WebKit/Source/core/page/FrameTree.cpp [modify] https://crrev.com/6d7ad9291cd3a290b767d241ce85e1d5fb835b85/third_party/WebKit/Source/core/page/FrameTree.h [modify] https://crrev.com/6d7ad9291cd3a290b767d241ce85e1d5fb835b85/third_party/WebKit/public/platform/web_feature.mojom
,
Nov 15 2017
Changing the priority back to the original P3, since the revert has gone through.
,
Mar 5 2018
,
Mar 12 2018
,
Mar 12 2018
|
||||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||||
Comment 1 by andypaicu@chromium.org
, Mar 29 2017