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] fixed pre/post authentication checks #9902

Merged
merged 1 commit into from Dec 31, 2013

Conversation

Projects
None yet
1 participant
@fabpot
Copy link
Member

fabpot commented Dec 30, 2013

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #8510, #9622
License MIT
Doc PR N/A

After further investigation of #8510, I found that all checks in the checkPreAuth actually belongs to checkPostAuth and the same goes for checks in CheckPostAuth (I checked the original source from Spring and indeed, that's how it is implemented there: see https://github.com/spring-projects/spring-security/blob/master/core/src/main/java/org/springframework/security/authentication/dao/AbstractUserDetailsAuthenticationProvider.java#L305
).

So, this PR fixes that issue. I think that we can do this change safely in 2.3 as the error message is the same for all causes by default ($hideUserNotFoundExceptions is true by default in UserAuthenticationProvider).

The only "real" change is whether the authentication is checked or not.

fabpot added a commit that referenced this pull request Dec 31, 2013

bug #9902 [Security] fixed pre/post authentication checks (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] fixed pre/post authentication checks

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8510, #9622
| License       | MIT
| Doc PR        | N/A

After further investigation of #8510, I found that all checks in the `checkPreAuth` actually belongs to `checkPostAuth` and the same goes for checks in `CheckPostAuth` (I checked the original source from Spring and indeed, that's how it is implemented there: see https://github.com/spring-projects/spring-security/blob/master/core/src/main/java/org/springframework/security/authentication/dao/AbstractUserDetailsAuthenticationProvider.java#L305
).

So, this PR fixes that issue. I think that we can do this change safely in 2.3 as the error message is the same for all causes by default (`$hideUserNotFoundExceptions` is `true` by default in `UserAuthenticationProvider`).

The only "real" change is whether the authentication is checked or not.

Commits
-------

ada82a2 [Security] fixed pre/post authentication checks

@fabpot fabpot merged commit ada82a2 into symfony:2.3 Dec 31, 2013

1 check was pending

default Success: 1 — Pending: 1
Details

@fabpot fabpot deleted the fabpot:security-checks branch Feb 3, 2014

hellomedia referenced this pull request in glutamatt/symfony Jun 6, 2014

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