Skip to content

Alert about wrong configuration.#718

Merged
markstory merged 1 commit into3.xfrom
cookie-fix
Apr 28, 2025
Merged

Alert about wrong configuration.#718
markstory merged 1 commit into3.xfrom
cookie-fix

Conversation

@dereuromark
Copy link
Copy Markdown
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

$salt = $this->getConfig('salt', '');
if ($identity[$usernameField] === null || $identity[$passwordField] === null) {
throw new InvalidArgumentException(
Copy link
Copy Markdown
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
Copy Markdown
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