httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1418721 - /httpd/httpd/trunk/modules/aaa/mod_auth_form.c
Date Sat, 08 Dec 2012 18:00:30 GMT
Author: minfrin
Date: Sat Dec  8 18:00:29 2012
New Revision: 1418721

URL: http://svn.apache.org/viewvc?rev=1418721&view=rev
Log:
mod_auth_form: Make sure 500 Internal Server Error is returned should an error
occur while parsing an expression.

Modified:
    httpd/httpd/trunk/modules/aaa/mod_auth_form.c

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=1418721&r1=1418720&r2=1418721&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_form.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_form.c Sat Dec  8 18:00:29 2012
@@ -1040,12 +1040,13 @@ static int authenticate_form_authn(reque
                             conf->loginsuccess, &err);
                     if (!err) {
                         apr_table_set(r->headers_out, "Location", loginsuccess);
+                        return HTTP_MOVED_TEMPORARILY;
                     }
                     else {
                         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02339)
                                       "Can't evaluate login success expression: %s", err);
+                        return HTTP_INTERNAL_SERVER_ERROR;
                     }
-                    return HTTP_MOVED_TEMPORARILY;
                 }
             }
         }
@@ -1061,12 +1062,13 @@ static int authenticate_form_authn(reque
                 conf->loginrequired, &err);
         if (!err) {
             apr_table_set(r->headers_out, "Location", loginrequired);
+            return HTTP_MOVED_TEMPORARILY;
         }
         else {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02340)
                           "Can't evaluate login required expression: %s", err);
+            return HTTP_INTERNAL_SERVER_ERROR;
         }
-        return HTTP_MOVED_TEMPORARILY;
     }
 
     /* did the user ask to be redirected on login success? */
@@ -1145,12 +1147,13 @@ static int authenticate_form_login_handl
                         conf->loginsuccess, &err);
                 if (!err) {
                     apr_table_set(r->headers_out, "Location", loginsuccess);
+                    return HTTP_MOVED_TEMPORARILY;
                 }
                 else {
                     ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02341)
                                   "Can't evaluate login success expression: %s", err);
+                    return HTTP_INTERNAL_SERVER_ERROR;
                 }
-                return HTTP_MOVED_TEMPORARILY;
             }
             return HTTP_OK;
         }
@@ -1162,12 +1165,13 @@ static int authenticate_form_login_handl
                 conf->loginrequired, &err);
         if (!err) {
             apr_table_set(r->headers_out, "Location", loginrequired);
+            return HTTP_MOVED_TEMPORARILY;
         }
         else {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02342)
                           "Can't evaluate login required expression: %s", err);
+            return HTTP_INTERNAL_SERVER_ERROR;
         }
-        return HTTP_MOVED_TEMPORARILY;
     }
 
     return rv;
@@ -1212,12 +1216,13 @@ static int authenticate_form_logout_hand
                 conf->logout, &err);
         if (!err) {
             apr_table_addn(r->headers_out, "Location", logout);
+            return HTTP_TEMPORARY_REDIRECT;
         }
         else {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02343)
                           "Can't evaluate logout expression: %s", err);
+            return HTTP_INTERNAL_SERVER_ERROR;
         }
-        return HTTP_TEMPORARY_REDIRECT;
     }
 
     return HTTP_OK;



Mime
View raw message