Repository navigation
[2.4.x] mod_authn_dbd, mod_authn_socache: Preserve extra query columns on a cache hit - #1111
Merged
Merged
Conversation
notroj
approved these changes
Nov 28, 2026
…ache hit (apache#982) mod_authn_dbd, mod_authn_socache: Preserve extra query columns on a cache hit AuthDBDUserPWQuery and AuthDBDUserRealmQuery may select columns beyond the password, which mod_authn_dbd exports as AUTHENTICATE_<NAME>. With mod_authn_socache in front of it ("socache dbd"), only the first, uncached login got them: a cache hit is answered from the cached hash alone. Add the optional function ap_authn_cache_store_env(), which takes the variables a lookup set along with the value to cache. mod_authn_socache keeps them in the same cache entry, so that they expire with it, and sets them again on a hit. mod_authn_dbd passes its extra columns through it, and does not cache a lookup with extra columns in a cache without it. An entry too long to be read back whole is not cached. PR 65172. (cherry picked from commit fe886b2)
An extra column of AuthDBDUserPWQuery or AuthDBDUserRealmQuery which is SQL NULL was put in the environment as a NULL table value. Since fe886b2 (apache#982) mod_authn_socache caches these values with the login, and with AuthnCacheProvideFor dbd the child crashed on a login for such a user, Basic or Digest. The variable is now set and empty, also without the cache. Before, env= tests saw it as not set, while CGI scripts already got an empty value. PR 65172. (cherry picked from commit e0feee1)
arturobernalg
force-pushed
the
backport/982-24x-v2
branch
from
November 28, 2026 14:17
a7ee376 to
80410b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #982 (trunk fe886b2) and its follow-up #1110 (trunk e0feee1), PR 65172: https://bz.apache.org/bugzilla/show_bug.cgi?id=65172
Without the changes test_018 fails on 2.4.x (the role lost on a cached login, and with only #982 a crash on a NULL column); with them it passes, and test/modules/aaa passes (87).