You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2014/04/07 10:59:07 UTC
svn commit: r1585431 - in /httpd/httpd/trunk:
docs/log-message-tags/next-number modules/aaa/mod_auth_form.c
Author: ylavic
Date: Mon Apr 7 08:59:07 2014
New Revision: 1585431
URL: http://svn.apache.org/r1585431
Log:
mod_auth_form: don't crash when no AuthFormProvider is configured. PR 56351
Modified:
httpd/httpd/trunk/docs/log-message-tags/next-number
httpd/httpd/trunk/modules/aaa/mod_auth_form.c
Modified: httpd/httpd/trunk/docs/log-message-tags/next-number
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1585431&r1=1585430&r2=1585431&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/log-message-tags/next-number (original)
+++ httpd/httpd/trunk/docs/log-message-tags/next-number Mon Apr 7 08:59:07 2014
@@ -1 +1 @@
-2615
+2620
Modified: httpd/httpd/trunk/modules/aaa/mod_auth_form.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_form.c?rev=1585431&r1=1585430&r2=1585431&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_form.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_form.c Mon Apr 7 08:59:07 2014
@@ -909,6 +909,14 @@ static int authenticate_form_authn(reque
return HTTP_INTERNAL_SERVER_ERROR;
}
+ /* We need an authentication provider. */
+ if (!conf->providers) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR,
+ 0, r, APLOGNO(02617) "need AuthFormProvider: %s",
+ r->uri);
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+
/* We need an authentication realm. */
if (!ap_auth_name(r)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR,
@@ -1282,7 +1290,7 @@ static int authenticate_form_post_config
ap_session_get_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_get);
ap_session_set_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_set);
if (!ap_session_load_fn || !ap_session_get_fn || !ap_session_set_fn) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO()
+ ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(02618)
"You must load mod_session to enable the mod_auth_form "
"functions");
return !OK;
@@ -1293,7 +1301,7 @@ static int authenticate_form_post_config
ap_request_insert_filter_fn = APR_RETRIEVE_OPTIONAL_FN(ap_request_insert_filter);
ap_request_remove_filter_fn = APR_RETRIEVE_OPTIONAL_FN(ap_request_remove_filter);
if (!ap_request_insert_filter_fn || !ap_request_remove_filter_fn) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO()
+ ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(02619)
"You must load mod_request to enable the mod_auth_form "
"functions");
return !OK;