-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transferSize might reveal HttpOnly cookies #238
Comments
This is one of many reasons Safari / WebKit doesn't expose transferSize. |
Hence TAO (timing-allow-origin) header, right? Or am I missing something?
…On Sat, Nov 21, 2020, 6:11 PM Ryosuke Niwa ***@***.***> wrote:
This is one of many reasons Safari / WebKit doesn't expose transferSize.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#238 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAPWVA3LRF3YYMGTVRXWVTSRBXN5ANCNFSM4T43YHIA>
.
|
TAO wouldn't help here. This isn't a cross origin issue. |
I'm not sure I'm following. Why transferSize should also not be available
from the same origin? Mind providing an example?
…On Sat, Nov 21, 2020, 11:08 PM Ryosuke Niwa ***@***.***> wrote:
Hence TAO (timing-allow-origin) header, right? Or am I missing something?
TAO wouldn't help here. This isn't a cross origin issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#238 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAPWVBRS66M5S3VSMJXGPDSRC2FHANCNFSM4T43YHIA>
.
|
httpOnly cookies should not be exposed to web content, even for the same origin. |
hey @rniwa can you expand a bit on what keeps Safari / WebKit from exposing transferSize or encoded transfer size? Is there a common x-kind of transfer size that is acceptable to all the vendors here? |
@annevk Could you provide a brief summary of how you could use |
@nicjansma you could just do a |
Also, we don't want to make it a requirement for web servers to insert varying lengths of HTTP(S) headers to obscure the presence of HttpOnly cookies. |
@annevk Ah yep, thanks, forgot XHR/fetch have access to all headers in some cases. |
This was discussed on the WG call the other week. Seems like a good path forward would be to remove the header sizes from |
I've analysed usage in Wikimedia codebases, and the libraries we distribute currently. Indeed the only use case currently found was to "guess" whether a resource was a local cache hit, 304 Not Modified response, or fresh download. Follows this pattern generally: // Resource Timing API
if (nt.transferSize === 0) {
browserCache = 'local hit';
} else if (nt.transferSize > 0 && nt.encodedBodySize > 0 && nt.transferSize < nt.encodedBodySize ) {
browserCache = 'local hit (after HTTP 304)';
} else {
browserCache = 'miss (HTTP 200 OK)';
} I support the mitigation reducing Now that we've learned that we don't want to expose the actual transfer size, I wonder it would make sense to remove this in a future interation of the spec. From what I can tell, it seems likely safe for web compat for it to become undefined, as the original spec didn't have it (afaik), and Safari still doesn't implement it. In that case, we may want to first decide how to provide the cache status in a more intiutive manner for future generations, since this definitely doesn't seem like a good API for it long-term. It would be confusing both because it doesn't provide what it appears to, and the thing it actually provides (cache status) is hard to learn/discover this way. It seems appealing to jump for a shiny new field like (Wording of "was" vs "did" still TBD in w3ctag/design-reviews#547) |
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878693 Commit-Queue: Yoav Weiss <yoavweiss@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#883803}
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878693 Commit-Queue: Yoav Weiss <yoavweiss@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#883803}
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878693 Commit-Queue: Yoav Weiss <yoavweiss@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#883803}
…spec, a=testonly Automatic update from web-platform-tests [Resource Timing] Align transferSize to spec Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878693 Commit-Queue: Yoav Weiss <yoavweiss@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#883803} -- wpt-commits: 12a4d39e06d9831ad96af1b70b3b55deb35bb42c wpt-pr: 28962
Cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/chromium/src/+/3062844: [M90-LTS] Align transferSize to spec Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html (cherry picked from commit 8d16683fe77e78dc06e87c9cdc9fd7e77f7759ea) Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0 Commit-Queue: Yoav Weiss <yoavweiss@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#883803} Reviewed-by: Artem Sumaneev <asumaneev@google.com> Reviewed-by: Jana Grill <janagrill@google.com> Owners-Override: Artem Sumaneev <asumaneev@google.com> Owners-Override: Jana Grill <janagrill@google.com> Commit-Queue: Jana Grill <janagrill@google.com> Cr-Commit-Position: refs/branch-heads/4430@{#1597} Cr-Branched-From: e5ce7dc4f7518237b3d9bb93cccca35d25216cbe-refs/heads/master@{#857950} Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Aligning transferSize to the spec means that response header sizes will no longer be directly exposed, even for same origin resources or resources with Timing-Allow-Origin headers. This is because it seems unsafe[1] to expose header sizes directly. It also means that redirect chains won't count towards the size exposed in `transferSize`. While we could specify and accumulate redirect body sizes, it seems like we'd be better off reporting redirects directly[2] in the future, in case it becomes a priority. PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sny4FO5_y5E [1] w3c/resource-timing#238 [2] https://w3c.github.io/web-performance/meetings/2021/2021-03-18/index.html Bug: 1185801 Change-Id: Iba071c6bb74c5522e3f1ed2586f082f11a7a68a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878693 Commit-Queue: Yoav Weiss <yoavweiss@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#883803} NOKEYCHECK=True GitOrigin-RevId: 8d16683fe77e78dc06e87c9cdc9fd7e77f7759ea
Which does not seem ideal. The web platform networking APIs purposefully filter out cookie headers everywhere. (Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1679737.)
The text was updated successfully, but these errors were encountered: