Skip to content

Alert about wrong configuration. #718

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
Apr 28, 2025
Merged

Alert about wrong configuration. #718

merged 1 commit into from
Apr 28, 2025

Conversation

dereuromark
Copy link
Member

I changed from username to login, but apparently, one authenticator wasnt adjusted.
this was hard to debug without a clear feedback.

@dereuromark dereuromark marked this pull request as ready for review April 24, 2025 17:02
@markstory markstory added this to the 3.x milestone Apr 26, 2025
@@ -134,9 +134,14 @@ protected function _createPlainToken(ArrayAccess|array $identity): string
$usernameField = $this->getConfig('fields.username');
$passwordField = $this->getConfig('fields.password');

$salt = $this->getConfig('salt', '');
if ($identity[$usernameField] === null || $identity[$passwordField] === null) {
throw new InvalidArgumentException(
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this create a 500 for the application? Could we use an exception that will render a 40x response instead?

Copy link
Member Author

@dereuromark dereuromark Apr 26, 2025

Choose a reason for hiding this comment

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

It should, it is a developer error.
It can only run into this if you misconfigured them afaik.

As otherwise it shouldnt even go into this authenticator that far.
They would at bare minimum be empty strings, never null. Null means you set them to impossible values IMO.

@dereuromark dereuromark requested a review from markstory April 28, 2025 13:38
@markstory markstory merged commit 1366eb4 into 3.x Apr 28, 2025
8 checks passed
@markstory markstory deleted the cookie-fix branch April 28, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants