couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject chttpd commit: updated refs/heads/master to 3509b91
Date Sat, 30 Jul 2016 18:54:32 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master 4e295902c -> 3509b9153


Don't set "authenticated" if party_mode_handler sets user context

Patch suggested by Ilya.

COUCHDB-3084


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/3509b915
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/3509b915
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/3509b915

Branch: refs/heads/master
Commit: 3509b91537266e29709789a5f8ccc4f101f4ce54
Parents: 4e29590
Author: Robert Newson <rnewson@apache.org>
Authored: Wed Jul 27 19:24:12 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Jul 27 19:24:12 2016 +0100

----------------------------------------------------------------------
 src/chttpd.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/3509b915/src/chttpd.erl
----------------------------------------------------------------------
diff --git a/src/chttpd.erl b/src/chttpd.erl
index 58d80d6..a5b8075 100644
--- a/src/chttpd.erl
+++ b/src/chttpd.erl
@@ -469,7 +469,7 @@ authenticate_request(Req) ->
     AuthenticationFuns = [
         {<<"cookie">>, fun chttpd_auth:cookie_authentication_handler/1},
         {<<"default">>, fun chttpd_auth:default_authentication_handler/1},
-        {<<"local">>, fun chttpd_auth:party_mode_handler/1} %% should be last
+        fun chttpd_auth:party_mode_handler/1 %% must be last
     ],
     authenticate_request(Req, chttpd_auth_cache, AuthenticationFuns).
 
@@ -484,6 +484,8 @@ authenticate_request(#httpd{user_ctx=#user_ctx{}} = Req, _AuthFuns) ->
     Req;
 authenticate_request(#httpd{} = Req, [{Name, AuthFun}|Rest]) ->
     authenticate_request(maybe_set_handler(AuthFun(Req), Name), Rest);
+authenticate_request(#httpd{} = Req, [AuthFun|Rest]) ->
+    authenticate_request(AuthFun(Req), Rest);
 authenticate_request(Response, _AuthFuns) ->
     Response.
 


Mime
View raw message