Skip to content

[2.1] Added caution about using is_granted in error pages #2079

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

Merged
merged 1 commit into from
Jan 3, 2013

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Dec 31, 2012

Closes #2078

You **must not** use ``is_granted`` in your error pages, because the
router runs before the firewall. If the router throws an exception (for
instance, when the route does not match), the error page is not behind a
firewall and ``app.user`` is not defined.
Copy link
Member

Choose a reason for hiding this comment

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

app.user is defined (we cannot delete the method from the object). But it is null

weaverryan added a commit that referenced this pull request Jan 3, 2013
[2.1] Added caution about using is_granted in error pages
@weaverryan weaverryan merged commit cd0e142 into symfony:2.1 Jan 3, 2013
@weaverryan
Copy link
Member

Awesome! I've merged and tweaked slightly (tweak is more minor than it looks due to line break changes).

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants