-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
feat: try to invalidate realpath cache if keypair loading failed #1046
Conversation
Thanks for your approval @chalasr. Do you plan to merge it soon? |
@@ -51,7 +51,17 @@ public function getAdditionalPublicKeys(): array | |||
throw new \RuntimeException(sprintf('Additional public key "%s" does not exist or is not readable. Did you correctly set the "lexik_jwt_authentication.additional_public_keys" configuration key?', $key)); | |||
} | |||
|
|||
$contents[] = is_file($key) ? file_get_contents($key) : $key; | |||
if (is_file($key)) { |
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.
The right part of the ternary expression is missing in this refactoring. Add an else
statement:
if (is_file($key)) {
//...
} else {
$contents[] = $key;
}
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.
Indeed, can you please update the patch?
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.
Sure, 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.
Oh crap, some tests seem broken. This is weird, tests pass on my local.
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.
No worries, it's not related to this change :)
Thank you @lobodol. |
Closes #1045