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

AccessDecisionManager does not validate the passed strategy #8646

Closed
denderello opened this issue Aug 2, 2013 · 3 comments
Closed

AccessDecisionManager does not validate the passed strategy #8646

denderello opened this issue Aug 2, 2013 · 3 comments

Comments

@denderello
Copy link
Contributor

Right now the AccessDecisionManager does not validate the strategy passed via the constructor. Since the SecurityBundle is not validating the strategy either, users will end up in a fatal error when they pass a strategy name that cannot be converted to a corresponding decision method (e.g. with a typo).

You can easily reproduce this with the following configuration in your security.yml:

security:
    access_decision_manager:
            strategy:             fooBar

which will produce an exception like this on a Symfony based project:
exception

Can we add a validation check for the passed strategy during the construction of AccessDecisionManager instances? I would volunteer to create a PR for this.

@stof
Copy link
Member

stof commented Aug 9, 2013

@denderello I think adding a check is a good idea. Can you provide a PR ?

@denderello
Copy link
Contributor Author

Sure. I will try to get one ready today. Otherwise I will have it ready
next week.

On Fri, Aug 9, 2013 at 11:51 AM, Christophe Coevoet <
notifications@github.com> wrote:

@denderello https://github.com/denderello I think adding a check is a
good idea. Can you provide a PR ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/8646#issuecomment-22385202
.

fabpot added a commit that referenced this issue Aug 13, 2013
This PR was merged into the master branch.

Discussion
----------

[Security] Added a check for strategies in AccessDecisionManager

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8646
| License       | MIT

Commits
-------

ee36380 [Security] Added a check for strategies in AccessDecisionManager
@denderello
Copy link
Contributor Author

I think now that #8710 is merged this one can be closed, right?

@fabpot fabpot closed this as completed Aug 13, 2013
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

No branches or pull requests

3 participants