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
[Security] defer log message in guard authenticator #29323
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eschultz-magix
changed the title
defer log message in guard authenticator
[Security] defer log message in guard authenticator
Nov 26, 2018
ro0NL
reviewed
Nov 26, 2018
if (null !== $this->logger) { | ||
$this->logger->debug('Calling getCredentials() on guard authenticator.', array('firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator))); | ||
} | ||
|
||
// abort the execution of the authenticator if it doesn't support the request | ||
if (!$guardAuthenticator->supports($request)) { |
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.
would it be useful to add a new log in this block then?
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.
Maybe it helps debugging. I have added two more log messages.
ro0NL
approved these changes
Nov 26, 2018
prevent an unneccessary log message if the guard authenticator does not support the current request
chalasr
force-pushed
the
defer_guard_log_message
branch
from
December 9, 2018 16:01
f67a317
to
21c3030
Compare
nicolas-grekas
approved these changes
Dec 9, 2018
chalasr
approved these changes
Dec 9, 2018
fabpot
approved these changes
Dec 10, 2018
Thank you @eschultz-magix. |
fabpot
added a commit
that referenced
this pull request
Dec 10, 2018
…ltz-magix) This PR was merged into the 3.4 branch. Discussion ---------- [Security] defer log message in guard authenticator prevent an unnecessary log message if the guard authenticator does not support the current request | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This PR defers log messages about "getCredentials()" method calls if more than one guard authentication provider is used. The method is only called if the provider supports the request. The log message may be confusing during development. Commits ------- 21c3030 [Security] defer log message in guard authenticator
This was referenced Jan 6, 2019
Merged
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
prevent an unnecessary log message if the guard authenticator does not support the current request
This PR defers log messages about "getCredentials()" method calls if more than one guard authentication provider is used. The method is only called if the provider supports the request. The log message may be confusing during development.