You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/05/05 20:36:17 UTC

[GitHub] [couchdb] jiahuili430 commented on issue #2483: function_clause when replicator receives a 401 or 402

jiahuili430 commented on issue #2483:
URL: https://github.com/apache/couchdb/issues/2483#issuecomment-832989870


   # I can't reproduce the issue
   I have tried to use CouchDB with plugin session, and without auth_plugins(auth_plugins = couch_replicator_auth_noop), but none of them can reproduce the problem.
   # Reproduce Steps
   ## 1. CouchDB with plugin session:
   Compile and run CouchDB 3.x locally
   ```
   make && ./dev/run --admin=adm:pass -n1
   ```
   Set require_valid_user to true
   ```
   curl -XPUT $DB/_node/_local/_config/chttpd/require_valid_user -d '"true"'
   ```
   Replicate with invalid credentials, but there is no **"function_clause"** in the log.
   ```
   curl -XPOST "$DB/_replicate"  \
     -H 'Content-Type:application/json' \
     -d "{\"source\": \"$DB/alice-db\", \"target\": \"http://adm:wrongpass@localhost:15984/alice-db-replicate\", \"create_target\": true }"
   
   {"error":"unauthorized","reason":"unauthorized to access or create database http://adm:*****@localhost:15984/alice-db-replicate/"}
   ```
   ## 2. CouchDB without auth_plugins:
   Set **auth_plugins = couch_replicator_auth_noop** in the "default.ini" file, and the follow the previous commands, but still cannot find **"function_clause"** in the log.
   # Environment
   - CouchDB version used: 3.x
   - Operating system and version: MacOS Big Sur 11.3.1
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org