Commit 6e25e206 authored by Paul Querna's avatar Paul Querna
Browse files

Fix segmentation fault in mod_auth_{basic,digest} when no provider is explicitly listed.

Reported by: Ben Collins-Sussman <sussman collab.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178674 13f79535-47bb-0310-9956-ffa450edef68
parent 2cf96bb1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -232,12 +232,13 @@ static int authenticate_basic_user(request_rec *r)
                auth_result = AUTH_GENERAL_ERROR;
                break;
            }
            apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, AUTHN_DEFAULT_PROVIDER);
        }
        else {
            provider = current_provider->provider;
            apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
        }

        apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);

        auth_result = provider->check_password(r, sent_user, sent_pw);

+2 −1
Original line number Diff line number Diff line
@@ -1353,12 +1353,13 @@ static authn_status get_hash(request_rec *r, const char *user,
                auth_result = AUTH_GENERAL_ERROR;
                break;
            }
            apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, AUTHN_DEFAULT_PROVIDER);
        }
        else {
            provider = current_provider->provider;
            apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
        }

        apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);

        /* We expect the password to be md5 hash of user:realm:password */
        auth_result = provider->get_realm_hash(r, user, conf->realm,