Skip to content
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

[5.2] update httponly flags #12818

Closed
wants to merge 4 commits into from
Closed

[5.2] update httponly flags #12818

wants to merge 4 commits into from

Conversation

it-can
Copy link
Contributor

@it-can it-can commented Mar 22, 2016

this is a updated version of #12809

in StartSession I also changed this:

Arr::get($config, 'secure', false)

to

$config['secure']

Is this correct?

@it-can it-can changed the title update httponly flags [5.2] update httponly flags Mar 22, 2016
@@ -135,7 +135,7 @@ protected function addCookieToResponse($request, $response)
$response->headers->setCookie(
new Cookie(
'XSRF-TOKEN', $request->session()->token(), time() + 60 * 120,
$config['path'], $config['domain'], $config['secure'], false
$config['path'], $config['domain'], $config['secure'], $config['http_only']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break on systems were that key does not exist.

@it-can
Copy link
Contributor Author

it-can commented Mar 22, 2016

Okay @GrahamCampbell, it should be fixed now...

@it-can
Copy link
Contributor Author

it-can commented Mar 22, 2016

Test seems to be failing because of this commit: b2f29b7

@@ -135,7 +135,7 @@ protected function addCookieToResponse($request, $response)
$response->headers->setCookie(
new Cookie(
'XSRF-TOKEN', $request->session()->token(), time() + 60 * 120,
$config['path'], $config['domain'], $config['secure'], false
$config['path'], $config['domain'], Arr::get($config, 'secure', false), Arr::get($config, 'http_only', true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this introduce a breaking change/behaviour change?

Currently, http_only is set to false, but with this change (and without updating laravel/laravel configuration), http_only would default to true.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this would be breaking.

@taylorotwell
Copy link
Member

@it-can stop changing unrelated code and just make your change.

@it-can it-can closed this Mar 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants