You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2022/08/22 14:49:44 UTC

[couchdb] branch fix-require_valid_user-config-section updated (dfc81d221 -> d4ac4457a)

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a change to branch fix-require_valid_user-config-section
in repository https://gitbox.apache.org/repos/asf/couchdb.git


 discard dfc81d221 config section for require_valid_user is only [chttpd]
     new d4ac4457a config section for require_valid_user is only [chttpd]

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (dfc81d221)
            \
             N -- N -- N   refs/heads/fix-require_valid_user-config-section (d4ac4457a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 rel/overlay/etc/local.ini | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


[couchdb] 01/01: config section for require_valid_user is only [chttpd]

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch fix-require_valid_user-config-section
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit d4ac4457a849ea9b3244da27c4502c3d32c3a880
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Mon Aug 22 16:43:07 2022 +0200

    config section for require_valid_user is only [chttpd]
---
 rel/overlay/etc/default.ini                                  | 3 +--
 rel/overlay/etc/local.ini                                    | 6 ++----
 src/chttpd/src/chttpd.erl                                    | 2 +-
 src/couch/src/couch_httpd.erl                                | 2 +-
 src/couch/src/couch_httpd_auth.erl                           | 4 ++--
 src/global_changes/test/eunit/global_changes_hooks_tests.erl | 2 +-
 6 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 316c7960c..b88dbcbce 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -247,7 +247,6 @@ bind_address = 127.0.0.1
 
 ; These options are moved from [couch_httpd_auth]
 ;authentication_redirect = /_utils/session.html
-;require_valid_user = false
 ;timeout = 600 ; number of seconds before automatic logout
 ;auth_cache_size = 50 ; size is number of cache entries
 ;allow_persistent_cookies = true ; set to false to disallow persistent cookies
@@ -323,7 +322,7 @@ bind_address = 127.0.0.1
 authentication_db = _users
 
 ; These settings were moved to [chttpd_auth]
-; authentication_redirect, require_valid_user, timeout,
+; authentication_redirect, timeout,
 ; auth_cache_size, allow_persistent_cookies, iterations, min_iterations,
 ; max_iterations, password_scheme, password_regexp, proxy_use_secret,
 ; public_fields, secret, users_db_public, cookie_domain, same_site
diff --git a/rel/overlay/etc/local.ini b/rel/overlay/etc/local.ini
index 4c847617c..ed2f5d234 100644
--- a/rel/overlay/etc/local.ini
+++ b/rel/overlay/etc/local.ini
@@ -43,11 +43,9 @@
 ; the whitelist.
 ;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
 
-[chttpd_auth]
-; If you set this to true, you should also uncomment the WWW-Authenticate line
-; above. If you don't configure a WWW-Authenticate header, CouchDB will send
+; If you set require_valid_user to true, you should also uncomment the WWW-Authenticate
+; line above. If you don't configure a WWW-Authenticate header, CouchDB will send
 ; Basic realm="server" in order to prevent you getting logged out.
-; require_valid_user = false
 
 [ssl]
 ;enable = true
diff --git a/src/chttpd/src/chttpd.erl b/src/chttpd/src/chttpd.erl
index 93b610719..13e919cb5 100644
--- a/src/chttpd/src/chttpd.erl
+++ b/src/chttpd/src/chttpd.erl
@@ -1173,7 +1173,7 @@ error_headers(#httpd{mochi_req = MochiReq} = Req, 401 = Code, ErrorStr, ReasonSt
                                     {Code, []};
                                 AuthRedirect ->
                                     case
-                                        chttpd_util:get_chttpd_auth_config_boolean(
+                                        chttpd_util:get_chttpd_config_boolean(
                                             "require_valid_user", false
                                         )
                                     of
diff --git a/src/couch/src/couch_httpd.erl b/src/couch/src/couch_httpd.erl
index 39faea418..76f8279f6 100644
--- a/src/couch/src/couch_httpd.erl
+++ b/src/couch/src/couch_httpd.erl
@@ -1080,7 +1080,7 @@ error_headers(#httpd{mochi_req = MochiReq} = Req, Code, ErrorStr, ReasonStr) ->
                                             {Code, []};
                                         AuthRedirect ->
                                             case
-                                                chttpd_util:get_chttpd_auth_config_boolean(
+                                                chttpd_util:get_chttpd_config_boolean(
                                                     "require_valid_user", false
                                                 )
                                             of
diff --git a/src/couch/src/couch_httpd_auth.erl b/src/couch/src/couch_httpd_auth.erl
index c74ca9bd8..a5a876b18 100644
--- a/src/couch/src/couch_httpd_auth.erl
+++ b/src/couch/src/couch_httpd_auth.erl
@@ -43,7 +43,7 @@
 
 party_mode_handler(Req) ->
     case
-        chttpd_util:get_chttpd_auth_config_boolean(
+        chttpd_util:get_chttpd_config_boolean(
             "require_valid_user", false
         )
     of
@@ -131,7 +131,7 @@ default_authentication_handler(Req, AuthModule) ->
                     Req;
                 false ->
                     case
-                        chttpd_util:get_chttpd_auth_config_boolean(
+                        chttpd_util:get_chttpd_config_boolean(
                             "require_valid_user", false
                         )
                     of
diff --git a/src/global_changes/test/eunit/global_changes_hooks_tests.erl b/src/global_changes/test/eunit/global_changes_hooks_tests.erl
index 5d6bbd13d..4872da82b 100644
--- a/src/global_changes/test/eunit/global_changes_hooks_tests.erl
+++ b/src/global_changes/test/eunit/global_changes_hooks_tests.erl
@@ -34,7 +34,7 @@ stop({Ctx, DbName}) ->
 setup(default) ->
     add_admin("admin", <<"pass">>),
     config:delete("chttpd_auth", "authentication_redirect", false),
-    config:set("chttpd_auth", "require_valid_user", "false", false),
+    config:set("chttpd", "require_valid_user", "false", false),
     get_host();
 setup(A) ->
     Host = setup(default),