You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2021/10/30 20:08:50 UTC

[couchdb] branch 3.x updated: fix(local.ini): straggling s/couch_httpd_auth/chttpd_auth/

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

jaydoane pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3.x by this push:
     new 5a7f1d4  fix(local.ini): straggling s/couch_httpd_auth/chttpd_auth/
5a7f1d4 is described below

commit 5a7f1d40c4f0f9327a9f4b19ce8c33a672fe818d
Author: Jay Doane <ja...@apache.org>
AuthorDate: Sat Oct 30 11:49:49 2021 -0700

    fix(local.ini): straggling s/couch_httpd_auth/chttpd_auth/
    
    The appropriately named `hack_local_ini` function in dev/run lives up
    to its name by adding a random `secret` to the end of whichever
    section contains the line `"; require_valid_user = false\n"`.
    
    Recent commits [1] updated the `setup` application from
    `couch_httpd_auth` to `chttpd_auth` without also changing this line
    in local.ini, which had the fun effect of causing `setup` to fail with
    this error:
    
    ```
    [error] 2021-10-30T18:50:15.019274Z node1@127.0.0.1 <0.817.0> 85d0421b9c setup sync_admin results [{badrpc,{'EXIT',{function_clause,[{config,set,["chttpd_auth","secret",undefined,true,nil],[{file,"src/config.erl"},{line,189}]},{rpc,'-handle_call_call/6-fun-0-',5,[{file,"rpc.erl"},{line,197}]}]}}},{badrpc,{'EXIT',{function_clause,[{config,set,["chttpd_auth","secret",undefined,true,nil],[{file,"src/config.erl"},{line,189}]},{rpc,'-handle_call_call/6-fun-0-',5,[{file,"rpc.erl"},{line,197 [...]
    [notice] 2021-10-30T18:50:15.019530Z node1@127.0.0.1 <0.817.0> 85d0421b9c 127.0.0.1:15984 127.0.0.1 adm POST /_cluster_setup 500 ok 12
    ```
    
    This change "fixes" dev/run by also updating the straggling section
    name in local.ini.
    
    [1] https://github.com/apache/couchdb/pull/3808
---
 rel/overlay/etc/local.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rel/overlay/etc/local.ini b/rel/overlay/etc/local.ini
index 2c9e899..398cf3e 100644
--- a/rel/overlay/etc/local.ini
+++ b/rel/overlay/etc/local.ini
@@ -43,7 +43,7 @@
 ; the whitelist.
 ;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
 
-[couch_httpd_auth]
+[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
 ; Basic realm="server" in order to prevent you getting logged out.