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

[Security] Change FormAuthenticator if condition #30347

Merged
merged 1 commit into from Feb 23, 2019
Merged

[Security] Change FormAuthenticator if condition #30347

merged 1 commit into from Feb 23, 2019

Conversation

PReimers
Copy link
Contributor

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30341
License MIT
Doc PR -

I changed the if condition in SimpleFormAuthenticationListener and UsernamePasswordFormAuthenticationListener based on the solution provided by @nikic in issue #30341

#OpenSourceFriday

@PReimers
Copy link
Contributor Author

Just discovered I need to write some additional tests.
They'll follow later today.

@PReimers
Copy link
Contributor Author

I changed the if condition and added some test cases to test additional scenarios.

I hope it's no problem I added a class in the test file. This allowed me to test if the $username variable contains a class containing a __toString() method

@chalasr chalasr added this to the 3.4 milestone Feb 22, 2019
@nicolas-grekas nicolas-grekas changed the title Change FormAuthenticator if condition [Security] Change FormAuthenticator if condition Feb 23, 2019
@nicolas-grekas
Copy link
Member

Thank you @PReimers.

@nicolas-grekas nicolas-grekas merged commit 67ae121 into symfony:3.4 Feb 23, 2019
nicolas-grekas added a commit that referenced this pull request Feb 23, 2019
This PR was squashed before being merged into the 3.4 branch (closes #30347).

Discussion
----------

[Security] Change FormAuthenticator if condition

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30341
| License       | MIT
| Doc PR        | -

I changed the if condition in `SimpleFormAuthenticationListener` and `UsernamePasswordFormAuthenticationListener` based on the solution provided by @nikic in issue #30341

#OpenSourceFriday

Commits
-------

67ae121 [Security] Change FormAuthenticator if condition
This was referenced Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants