mirror of
https://github.com/apache/httpd.git
synced 2025-08-13 14:40:20 +00:00
Restore support for the AUTH_HANDLED return code in AUTHN providers,
like in 2.2, which allows authn provider to return their own status in r->status (custom error code, or return a redirect) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1499351 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -435,6 +435,7 @@
|
||||
* 20121222.15 (2.5.0-dev) Add allow/decode_encoded_slashes_set to core_dir_config
|
||||
* 20121222.16 (2.5.0-dev) AP_DEFAULT_HANDLER_NAME/AP_IS_DEAULT_HANDLER_NAME
|
||||
* 20130702.0 (2.5.0-dev) Remove pre_htaccess hook, add open_htaccess hook.
|
||||
* 20130702.1 (2.5.0-dev) Restore AUTH_HANDLED to mod_auth.h
|
||||
*/
|
||||
|
||||
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
|
||||
@ -442,7 +443,7 @@
|
||||
#ifndef MODULE_MAGIC_NUMBER_MAJOR
|
||||
#define MODULE_MAGIC_NUMBER_MAJOR 20130702
|
||||
#endif
|
||||
#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
|
||||
#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
|
||||
|
||||
/**
|
||||
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
|
||||
|
@ -66,7 +66,8 @@ typedef enum {
|
||||
AUTH_GRANTED,
|
||||
AUTH_USER_FOUND,
|
||||
AUTH_USER_NOT_FOUND,
|
||||
AUTH_GENERAL_ERROR
|
||||
AUTH_GENERAL_ERROR,
|
||||
AUTH_HANDLED
|
||||
} authn_status;
|
||||
|
||||
typedef enum {
|
||||
|
@ -359,6 +359,9 @@ static int authenticate_basic_user(request_rec *r)
|
||||
"user %s not found: %s", sent_user, r->uri);
|
||||
return_code = HTTP_UNAUTHORIZED;
|
||||
break;
|
||||
case AUTH_HANDLED:
|
||||
return_code = r->status;
|
||||
break;
|
||||
case AUTH_GENERAL_ERROR:
|
||||
default:
|
||||
/* We'll assume that the module has already said what its error
|
||||
|
@ -1728,6 +1728,9 @@ static int authenticate_digest_user(request_rec *r)
|
||||
note_digest_auth_failure(r, conf, resp, 0);
|
||||
return HTTP_UNAUTHORIZED;
|
||||
}
|
||||
else if (return_code == AUTH_HANDLED) {
|
||||
return r->status;
|
||||
}
|
||||
else {
|
||||
/* AUTH_GENERAL_ERROR (or worse)
|
||||
* We'll assume that the module has already said what its error
|
||||
|
Reference in New Issue
Block a user