New issue
Advanced search Search tips

Issue 832045 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Same-site (lax) cookies are being stripped from requests when using request interception.

Reported by halleniu...@gmail.com, Apr 12 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Interact with Chrome headless using the debug protocol and setup request interception using https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setRequestInterception
and
https://chromedevtools.github.io/devtools-protocol/tot/Network#method-continueInterceptedRequest
2. Navigate to https://same-site.fredrik-almroth.se/
3. Click the submit button.

What is the expected behavior?
The cookie called "c" to be part of the POST request and the PoC script to respond with "Cookie included in post"

What went wrong?
The cookie is being stripped from the POST request, presumable because the request is considered to be from a different origin as it's being intercepted while in transit.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 29.0 r0

I also tested this in "Google Chrome 67.0.3386.1 dev" without any luck.  

I realize that request interception is currently flagged as experimental but figured it wouldn't hurt to report bugs for it regardless.
 

Comment 1 by ricea@chromium.org, Apr 12 2018

Components: -Blink>Network Platform>DevTools>Network
Labels: Needs-Triage-M65
Labels: Needs-Feedback Triaged-ET
Tested the issue on chrome reported version 65.0.3325.181 using Ubuntu 14.04 with steps mentioned below:
1) Launched chrome reported version and navigated to URL: https://same-site.fredrik-almroth.se/
2) Clicked on "submit" button, able to see the response as "Cookie included in post" 
Note: As mentioned in steps to reproduce the problem in comment# 0, we are not sure about the step-1, how to proceed on it.

@Reporter: Please find the attached screen cast for your reference and provide your feedback on it which help in further triaging it. If possible could you please provide screencast of the issue which help in better understanding.

Thanks!

832045.ogv
1.5 MB View Download
Hello, thanks for taking a look at this issue.

It appears like I did a really poor job explaining it so I'll make another attempt. The problem does not show up when usual "regular" chrome to browse to the example I provided before, it only appears when request-interception is enabled. 

I've attached two simple nodejs scripts (sorry for the code quality, nodejs is not my primary language) that can be used to reproduce this issue. I also included a video of me running the scripts. 

The first script (without-inception.js) will go to https://same-site.fredrik-almroth.se/ using headless chrome controlled using the devtools protocol and then click the submit-button using javascript. This script is excepted to return with a successful result where the cookie is included in the following POST request generated by the clicking submit.

The second script is the same as the first one but with request-interception added. Meaning the script will have the option of blocking requests if it chooses to, in my example I always let the request execute so I shouldn't expect chrome to behave differently when interacting with the site. Unfortunately that's not the case and the script will return "Failure! Same-site cookies was NOT included in POST request" meaning that chrome stripped away the cookie. 

I should add that I do not believe this to be a problem with the lib I'm using to interact with Chrome as we've tested multiple libs with the same result. 
nodejspoc.zip
2.8 KB Download
samesite.mkv
1.1 MB Download
Project Member

Comment 5 by sheriffbot@chromium.org, Apr 13 2018

Cc: viswa.karala@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: caseq@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 8 by caseq@chromium.org, May 4 2018

Status: Fixed (was: Assigned)

Sign in to add a comment