Skip to content

Commit

Permalink
Fix type of LDAP server params hash in cache entry
Browse files Browse the repository at this point in the history
In 1ed7ad5, we switched from (`size_t`, usually 64bit) to SipHash (128bit) and forgot to change the type of the cache entry. This broke the caching of successful LDAP authentication requests (verification cooldown).

Fixes #50864
  • Loading branch information
jmaicher authored and Julian Maicher committed Jun 12, 2023
1 parent eb698a7 commit c378c3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Access/ExternalAuthenticators.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <Access/GSSAcceptor.h>
#include <base/defines.h>
#include <base/types.h>
#include <base/extended_types.h>

#include <chrono>
#include <map>
Expand Down Expand Up @@ -42,7 +43,7 @@ class ExternalAuthenticators
private:
struct LDAPCacheEntry
{
std::size_t last_successful_params_hash = 0;
UInt128 last_successful_params_hash = 0;
std::chrono::steady_clock::time_point last_successful_authentication_timestamp;
LDAPClient::SearchResultsList last_successful_role_search_results;
};
Expand Down

0 comments on commit c378c3f

Please sign in to comment.