Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpKernel] Uses cookies to track the requests redirection#25719

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@sroze
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#25698
LicenseMIT
Doc PRø

In order to track the redirections across requests, we need to have some state. So far, we've been using the session but some users have complained about it (#24774,#24730). The idea is that we don't actually need the session, we can use cookies.

It's a tradeoff: using a cookie would mean that both the redirection and the target page will not be cachable (because of the Set-Cookie to set the sf_redirect and the one to clear it).

As it's only on dev, it seems fair to say that having no cache (because ofSet-Cookies) is a better side effect than starting the session.

@stof
Copy link
Member

stof commentedJan 8, 2018

Well, solving a complain about one page being uncachable by keeping it uncachable for a different reason does not seem to solve it.

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedJan 8, 2018
edited
Loading

@stof at least this would make it explicit aboutwhy this is not cached, and also would prevent messing up with users' Cache-Control headers. So far better IMHO.

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneJan 8, 2018
@sroze
Copy link
ContributorAuthor

Yup,@nicolas-grekas' point was my reasoning behind it. Note that Travis' error is unrelated.

@stof
Copy link
Member

stof commentedJan 8, 2018

Looks good to me then

@fabpot
Copy link
Member

Thank you@sroze.

@fabpotfabpot merged commit83f2579 intosymfony:3.4Jan 8, 2018
fabpot added a commit that referenced this pull requestJan 8, 2018
…n (sroze)This PR was merged into the 3.4 branch.Discussion----------[HttpKernel] Uses cookies to track the requests redirection| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#25698| License       | MIT| Doc PR        | øIn order to track the redirections across requests, we need to have some state. So far, we've been using the session but some users have complained about it (#24774,#24730). The idea is that we don't actually need the session, we can use cookies.It's a tradeoff: using a cookie would mean that both the redirection and the target page will not be cachable (because of the Set-Cookie to set the sf_redirect and the one to clear it).As it's only on dev, it seems fair to say that having no cache (because of `Set-Cookie`s) is a better side effect than starting the session.Commits-------83f2579 Uses cookies to track the requests redirection
@srozesroze deleted the uses-cookies-to-track-redirections branchJanuary 8, 2018 18:53
fabpot added a commit that referenced this pull requestJan 10, 2018
…redirection (sroze)This PR was merged into the 3.4 branch.Discussion----------[HttpKernel] Add tests for request collector and cookie redirection| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes (#25719)| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        | øNot that I felt bad doing a PR without tests (#25719) but this one adds tests to be sure we stabilize this cookie-based redirection.Commits-------7b4f5a1 Add tests for the HttpKernel request collector and redirection via cookies
This was referencedJan 29, 2018
@lookitsjonno
Copy link

This PR discloses the file system structure to the browser which isn't great in terms of security.

@nicolas-grekas
Copy link
Member

The profiler discloses way more info than just this cookie. It's always been flagged as FOR DEV ONLY.

@lookitsjonno
Copy link

The profiler discloses way more info than just this cookie. It's always been flagged as FOR DEV ONLY.

The folder structure is disclosed in production with profiler disabled.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@sroze@stof@nicolas-grekas@fabpot@lookitsjonno@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp