https://bz.apache.org/bugzilla/show_bug.cgi?id=61546

            Bug ID: 61546
           Summary: [PATCH] mod_authz_dbd segfaults when AuthzDBDQuery
                    missing
           Product: Apache httpd-2
           Version: 2.4.27
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_authz_dbd
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 35340
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35340&action=edit
Patch fixing this issue

mod_authz_dbd segfaults when AuthzDBDQuery is missing in httpd configuration. 

<Location /moria>
  AuthName "The Mines of Moria"
  AuthType Basic
  AuthBasicProvider dbd
  AuthDBDUserPWQuery "SELECT password FROM users WHERE username = %s"
  Require dbd-group istari
  #AuthzDBDQuery "SELECT groupname FROM groups WHERE username = %s"
</Location>


Since AuthzDBDQuery is not set, authz_dbd_prepare is not called and therefore
dbd_handle remains NULL.


This causes segmentation fault, if authz_dbd_login or authz_dbd_group_query
functions are triggered, because in the variable initialization is this code:

ap_dbd_t *dbd = dbd_handle(r);

I moved it after check, if cfg->query is NULL.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to