Skip to content

Conversation

@nickvergessen
Copy link
Member

Fix #36046

Regression from #33898

While the given patch heavily improves the situation, it still performs kind of a DDoS attach on the database, as all entries get updated on each authentication, which also is on basic auth.

I might be wrong, but I think $this->hasher->verify is meant to be !$this->hasher->verify, so we update the password of all tokens that do NOT decrypt to the current password?

Checklist

@marcelklehr
Copy link
Member

Yep, I'm sorry. I messed up the !

We need to store the new authentication details when the hash did **not** verify
the old password.

Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen force-pushed the bugfix/36046/only-verify-the-same-hash-once branch from 0810d46 to 2fb4dac Compare January 9, 2023 15:32
@marcelklehr
Copy link
Member

Thanks! Looks much better now :)

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 10, 2023
@nickvergessen nickvergessen merged commit fc096ae into master Jan 10, 2023
@nickvergessen nickvergessen deleted the bugfix/36046/only-verify-the-same-hash-once branch January 10, 2023 14:40
@marcelklehr
Copy link
Member

Customer reports slowdowns on basic auth with this applied to stable25

@nickvergessen
Copy link
Member Author

See above your comment?
grafik

@marcelklehr
Copy link
Member

Yes, that is the patch that causes slowdowns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feature: authentication performance 🚀 regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Password update routine slowness

5 participants