|Summary:||authn_socache doesn't cache well with authn_dbd if query contains additional columns|
|Product:||Apache httpd-2||Reporter:||Avi <avi>|
|Component:||mod_authn_socache||Assignee:||Apache HTTPD Bugs Mailing List <bugs>|
Description Avi 2021-03-06 21:00:04 UTC
Hi, As recommended in the docs, I tried configuring authn_dbd with authn_socache. This works well if AuthDBDUserPWQuery contains only the password column, but if it contains additional columns then it doesn't cache them and their value cannot be used. e.g. AuthDBDUserPWQuery "SELECT password, name, mail, ... FROM users" in such case, the value of name, mail, etc.. will not be defined as AUTHENTICATE_ variables as expected.
Comment 1 Dave Pearson 2021-04-20 20:26:03 UTC
I can confirm this behavior, and would like to add that the first time the login is used, all will appear well, it is only subsequent accesses (i.e. via cache) that do not show any of the AUTHENTICATE_ variables. This can be quite easily shown by simply calling a phpinfo(); in a test php file - upon refreshing the page using F5 in the browser, the AUTHENTICATE_ variables all clearly disappear after firstly being visible after login. Changing the AuthBasicProvider socache dbd to AuthBasicProvider dbd "fixes" this issue, but it will no longer cache the credentials.