From 2797b883caad12a79833e6a5318681219156e8a9 Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Wed, 16 Nov 2005 16:35:49 +0000 Subject: [PATCH] Remove support for 'On' and 'Off' for AuthBasicProvider and AuthDigestProvider as it doesn't actually work as advertised. Reviewed by: Joshua Slive (concept) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345054 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/aaa/mod_auth_basic.c | 17 ++--------------- modules/aaa/mod_auth_digest.c | 17 ++--------------- 3 files changed, 7 insertions(+), 30 deletions(-) diff --git a/CHANGES b/CHANGES index 462b248ae8..7964b2b802 100644 --- a/CHANGES +++ b/CHANGES @@ -36,6 +36,9 @@ Changes with Apache 2.3.0 Changes with Apache 2.1.10 + *) Remove support for 'On' and 'Off' for AuthBasicProvider and + AuthDigestProvider. [Joshua Slive, Justin Erenkrantz] + *) Add in new UseCanonicalPhysicalPort directive, which controls whether or not Apache will ever use the actual physical port when constructing the canonical port number. [Jim Jagielski] diff --git a/modules/aaa/mod_auth_basic.c b/modules/aaa/mod_auth_basic.c index c6192b36ef..c009af2855 100644 --- a/modules/aaa/mod_auth_basic.c +++ b/modules/aaa/mod_auth_basic.c @@ -54,22 +54,9 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config, { auth_basic_config_rec *conf = (auth_basic_config_rec*)config; authn_provider_list *newp; - const char *provider_name; - - if (strcasecmp(arg, "on") == 0) { - provider_name = AUTHN_DEFAULT_PROVIDER; - } - else if (strcasecmp(arg, "off") == 0) { - /* Clear all configured providers and return. */ - conf->providers = NULL; - return NULL; - } - else { - provider_name = apr_pstrdup(cmd->pool, arg); - } newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list)); - newp->provider_name = provider_name; + newp->provider_name = apr_pstrdup(cmd->pool, arg); /* lookup and cache the actual provider now */ newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP, @@ -87,7 +74,7 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config, /* if it doesn't provide the appropriate function, reject it */ return apr_psprintf(cmd->pool, "The '%s' Authn provider doesn't support " - "Basic Authentication", provider_name); + "Basic Authentication", newp->provider_name); } /* Add it to the list now. */ diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 8a0ee5a130..75c31960c6 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -446,22 +446,9 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config, { digest_config_rec *conf = (digest_config_rec*)config; authn_provider_list *newp; - const char *provider_name; - - if (strcasecmp(arg, "on") == 0) { - provider_name = AUTHN_DEFAULT_PROVIDER; - } - else if (strcasecmp(arg, "off") == 0) { - /* Clear all configured providers and return. */ - conf->providers = NULL; - return NULL; - } - else { - provider_name = apr_pstrdup(cmd->pool, arg); - } newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list)); - newp->provider_name = provider_name; + newp->provider_name = apr_pstrdup(cmd->pool, arg); /* lookup and cache the actual provider now */ newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP, @@ -479,7 +466,7 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config, /* if it doesn't provide the appropriate function, reject it */ return apr_psprintf(cmd->pool, "The '%s' Authn provider doesn't support " - "Digest Authentication", provider_name); + "Digest Authentication", newp->provider_name); } /* Add it to the list now. */ -- 2.40.0