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

Ensure $request->hasSession() is always checked before calling getSession()#32703

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
nicolas-grekas merged 1 commit intosymfony:4.4fromArman-Hosseini:patch-6
Jul 30, 2019
Merged

Conversation

@Arman-Hosseini
Copy link
Contributor

@Arman-HosseiniArman-Hosseini commentedJul 24, 2019
edited by chalasr
Loading

QA
Branch?4.4
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedJul 24, 2019
edited
Loading

Any reason why you're proposing this?

@Arman-Hosseini
Copy link
ContributorAuthor

@nicolas-grekas
Just improving the codes.

@fabpot
Copy link
Member

We do not change code that works. We did such refactoring in the past and that introduced some bugs. So, we either refactor to fix a bug or we keep the current code.

@nicolas-grekasnicolas-grekas changed the base branch from3.4 to4.4July 27, 2019 09:07
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

I rebased this PR for 4.4 and reviewed the full code base to ensure we don't call getSession without checking hasSession before, as it is required now (getSession throws in 5.0 instead of returning null)

@nicolas-grekasnicolas-grekas changed the title[Security] Update some of the codes in AuthenticationUtilsEnsure $request->getSession() always checks hasSession() beforeJul 27, 2019
@nicolas-grekasnicolas-grekas changed the titleEnsure $request->getSession() always checks hasSession() beforeEnsure $request->hasSession() is always checked before calling getSession()Jul 27, 2019
@nicolas-grekasnicolas-grekas modified the milestones:3.4,nextJul 27, 2019
@Arman-Hosseini
Copy link
ContributorAuthor

@nicolas-grekas thank you.

xabbuh
xabbuh previously requested changesJul 27, 2019
Copy link
Member

@xabbuhxabbuh left a comment

Choose a reason for hiding this comment

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

looks like some tests are failing

chalasr reacted with thumbs up emoji
@chalasr
Copy link
Member

@xabbuh fixed, thanks

@nicolas-grekas
Copy link
Member

Thank you@Arman-Hosseini.

Arman-Hosseini reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commit7b2c326 intosymfony:4.4Jul 30, 2019
nicolas-grekas added a commit that referenced this pull requestJul 30, 2019
…ling getSession() (Arman-Hosseini)This PR was merged into the 4.4 branch.Discussion----------Ensure $request->hasSession() is always checked before calling getSession()| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Commits-------7b2c326 Ensure $request->hasSession() is always checked before calling getSession()
@Arman-HosseiniArman-Hosseini deleted the patch-6 branchJuly 30, 2019 16:01
@nicolas-grekasnicolas-grekas modified the milestones:next,4.4Oct 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@xabbuhxabbuhxabbuh approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

6 participants

@Arman-Hosseini@nicolas-grekas@fabpot@chalasr@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp