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

Skip to content

[Security][Profiler] Display the original expression in 'Access decision log' #26273

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
Mar 19, 2018

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Feb 22, 2018

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

before:

screenshot at 2018-02-22 18-22-28

after:

after

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Feb 22, 2018
@lyrixx lyrixx force-pushed the security-profiler-expression branch 2 times, most recently from e4f3ae7 to c2d42ae Compare February 22, 2018 17:24
@stof
Copy link
Member

stof commented Feb 22, 2018

I suggest also adding my patch from #24127 (comment) (the second one), to use profiler_dump(first) when first represents a non-string value, instead of displaying the string-casting of the Data object (the class name with the number of property in it is totally useless).

We might even consider this as a bugfix.

{{ decision.attributes|first }}
{% set first = decision.attributes|first %}
{% if first.expression is defined %}
Expression: <code><pre>{{ first.expression }}</pre></code>
Copy link
Member

Choose a reason for hiding this comment

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

should be <pre><code></code></pre> as <code> is an inline element while <pre> is a block element.

@lyrixx
Copy link
Member Author

lyrixx commented Feb 22, 2018

@stof I addressed your comments.

@fabpot
Copy link
Member

fabpot commented Feb 25, 2018

Looks like a bug fix to me, no?

@lyrixx lyrixx force-pushed the security-profiler-expression branch from afcd558 to 8f16c2e Compare February 28, 2018 08:33
@lyrixx lyrixx changed the base branch from master to 3.4 February 28, 2018 08:33
@lyrixx
Copy link
Member Author

lyrixx commented Feb 28, 2018

I have rebased my branch onto 3.4, and changed the base branch for this PR in order to merge it as a bug fix.

chalasr
chalasr approved these changes Mar 2, 2018
@nicolas-grekas
Copy link
Member

Thank you @lyrixx.

@nicolas-grekas nicolas-grekas merged commit 8f16c2e into symfony:3.4 Mar 19, 2018
nicolas-grekas added a commit that referenced this pull request Mar 19, 2018
…ccess decision log' (lyrixx)

This PR was merged into the 3.4 branch.

Discussion
----------

[Security][Profiler] Display the original expression in 'Access decision log'

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

---

before:

![screenshot at 2018-02-22 18-22-28](https://user-images.githubusercontent.com/408368/36553752-798001ba-17fd-11e8-9539-254a25a01e60.png)

after:

![after](https://user-images.githubusercontent.com/408368/36553856-b7449fe2-17fd-11e8-94cb-ddaf4f033511.png)

Commits
-------

8f16c2e [Security][Profiler] Display the original expression in 'Access decision log'
@lyrixx lyrixx deleted the security-profiler-expression branch March 19, 2018 17:28
This was referenced Apr 3, 2018
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.

7 participants