Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.1][Security] Fix DebugAccessDecisionManager when object is not a scalar #18949

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

Conversation

romainneutron
Copy link
Contributor

Q A
Branch? 3.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT

@nicolas-grekas
Copy link
Member

👍

@romainneutron
Copy link
Contributor Author

I've not added test because this class is not tested at all. If you want, I can add some

@stof
Copy link
Member

stof commented Jun 2, 2016

would be great to add some tests, yeah

return sprintf('%s (%s)', gettype($object), $object);
if (is_scalar($object)) {
return sprintf('%s (%s)', gettype($object), $object);
} else {
Copy link
Member

Choose a reason for hiding this comment

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

else is useless

@romainneutron romainneutron force-pushed the fix-debug-access-decision-manager branch 2 times, most recently from f85b568 to ce015c0 Compare June 2, 2016 11:32
@romainneutron
Copy link
Contributor Author

PR updated, tests added

@romainneutron romainneutron force-pushed the fix-debug-access-decision-manager branch from ce015c0 to c916783 Compare June 2, 2016 11:33
{
$object = new \stdClass();

yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => 'NULL', 'result' => false]], null];
Copy link
Member

Choose a reason for hiding this comment

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

we don't use the short array syntax in Symfony

@romainneutron romainneutron force-pushed the fix-debug-access-decision-manager branch 2 times, most recently from 8976fd1 to af15dfb Compare June 2, 2016 14:35
@romainneutron
Copy link
Contributor Author

PR updated, comments addressed

@romainneutron romainneutron force-pushed the fix-debug-access-decision-manager branch from af15dfb to ff2d189 Compare June 2, 2016 14:45
@fabpot
Copy link
Member

fabpot commented Jun 3, 2016

Thank you @romainneutron.

@fabpot fabpot merged commit ff2d189 into symfony:3.1 Jun 3, 2016
fabpot added a commit that referenced this pull request Jun 3, 2016
… is not a scalar (romainneutron)

This PR was merged into the 3.1 branch.

Discussion
----------

[3.1][Security] Fix DebugAccessDecisionManager when object is not a scalar

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT

Commits
-------

ff2d189 [Security] Fix DebugAccessDecisionManager when object is not a scalar
@romainneutron romainneutron deleted the fix-debug-access-decision-manager branch June 3, 2016 19:14
@fabpot fabpot mentioned this pull request Jun 15, 2016
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.

4 participants