-
Notifications
You must be signed in to change notification settings - Fork 326
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
Add a logger in the ResettingController #7257
Add a logger in the ResettingController #7257
Conversation
src/Sulu/Bundle/SecurityBundle/Controller/ResettingController.php
Outdated
Show resolved
Hide resolved
src/Sulu/Bundle/SecurityBundle/Controller/ResettingController.php
Outdated
Show resolved
Hide resolved
src/Sulu/Bundle/SecurityBundle/Controller/ResettingController.php
Outdated
Show resolved
Hide resolved
src/Sulu/Bundle/SecurityBundle/Controller/ResettingController.php
Outdated
Show resolved
Hide resolved
@@ -228,7 +240,9 @@ public function sendEmailAction(Request $request) | |||
$email = $this->getEmail($user); | |||
$this->sendTokenEmail($user, $this->getSenderAddress($request), $email, $token); | |||
} catch (\Exception $ex) { | |||
// do nothing | |||
if ($this->logger instanceof LoggerInterface) { |
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.
This check can be avoided when fallback on __construct to new NullLogger
.
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
@@ -62,6 +62,7 @@ | |||
<argument>%sulu_security.reset_password.mail.token_send_limit%</argument> | |||
<argument>%sulu_admin.email%</argument> | |||
<argument>%kernel.secret%%</argument> |
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.
Btw that looks like a typo is it supposed to have two percent signs?
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.
Looks wrong to me. Think this should be only one %
. Currently it may just added always a %
to the secret.
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.
I've opened an issue for that. I wouldn't want to fix that here.
a0820ad
to
e8d801d
Compare
src/Sulu/Bundle/SecurityBundle/Controller/ResettingController.php
Outdated
Show resolved
Hide resolved
7c85965
to
dcdec55
Compare
bd5579e
to
f70e286
Compare
What's in this PR?
Adding the logger to the ResettingController
Why?
Swallowing the error and not showing any errors is not very helpful for debugging purposes adding a Logger to at least log the error will help.