-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Make it clear that the profiler is for dev only #28572
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
Conversation
fabpot
commented
Sep 24, 2018
Q | A |
---|---|
Branch? | master |
Bug fix? | kinda yes |
New feature? | yes |
BC breaks? | no |
Deprecations? | yes (permanent one) |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | symfony/symfony-docs#10386 |
public function boot() | ||
{ | ||
if ('prod' === $this->container->getParameter('kernel.environment')) { | ||
@trigger_error('Using WebProfilerBundle in production is not supported and put your project at risk, disable it.', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E_USER_WARNING
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
2.8? |
2.8 is not possible as we had several storage implementations back then. |
fd85363
to
79a029d
Compare
The message is still correct on 2.8 to me. Since this involves security, we can do it :) |
public function boot() | ||
{ | ||
if ('prod' === $this->container->getParameter('kernel.environment')) { | ||
@trigger_error('Using WebProfilerBundle in production is not supported and put your project at risk, disable it.', E_USER_WARNING); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
* As the profiler must only be used in non-production environments, the file storage | ||
* is more than enough and no other implementations will ever be supported. | ||
* | ||
* @internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since Symfony 4.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
79a029d
to
543f030
Compare
The Web profiler bundle is a **development tool** that gives detailed | ||
information about the execution of any request. | ||
|
||
**Never** enable it in production environments as it will lead to major security |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Production environment" is ambiguous. Is it the Symfony production environment (prod
), or does it represent the production environment of your server?
In case of the latter, it should only be made accessible if really needed, in dev
and well secured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we are talking about production servers. I will update the comment to make it clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's better! 👍
543f030
to
54fda55
Compare
@@ -1,6 +1,12 @@ | |||
WebProfilerBundle | |||
================= | |||
|
|||
The Web profiler bundle is a **development tool** that gives detailed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add this message on branch 2.8 also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #28575
This PR was merged into the 4.2-dev branch. Discussion ---------- Make it clear that the profiler is for dev only | Q | A | ------------- | --- | Branch? | master | Bug fix? | kinda yes | New feature? | yes | BC breaks? | no | Deprecations? | yes (permanent one) | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | symfony/symfony-docs#10386 Commits ------- 54fda55 made it clear that the profiler is for dev only