-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating index with "ddoc":"" makes DB read-only #1472
Labels
Comments
if not let me know and we can reopen |
#961 is unrelated. Letting you know it is not fixed in 2.2.x branch. Just built 2.2.0 from sources to check it. |
Confirmed:
|
This still happens. With auto-indexer (ken) it's even worse as it will start crashing as well and flooding the logs with failures that look like:
|
4 tasks
jiahuili430
added a commit
to jiahuili430/couchdb
that referenced
this issue
Apr 26, 2022
Creating an index with "ddoc":"" or "name":"" should return a 400 Bad Request. Testing recommendations: ``` curl -X DELETE $db/abc && curl -X PUT $db/abc curl -X POST $db/abc/_index -H 'Content-Type: application/json' -d '{"ddoc": "", "index": {"fields": ["foo"]}}' curl -X POST $db/abc/_index -H 'Content-Type: application/json' -d '{"name": "", "index": {"fields": ["bar"]}}' {"error":"invalid_empty_string","reason":"Index name/ddoc cannot be empty"} ``` Related Issues: apache#1472
tonysun83
pushed a commit
that referenced
this issue
Apr 26, 2022
Creating an index with "ddoc":"" or "name":"" should return a 400 Bad Request. This fixes: #1472
It appears that #3990 fixes this issue, so closing as resolved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
CouchDB should prevent creation of Mango index ddoc with the
_design/
_id.Current Behavior
POST-ing JSON body with
"ddoc":""
field to/db/_index
creates a ddoc, which seems non-deletable, effectively breaks replication and makes DB non-writable (both PUT and POST fail with 500).Steps to Reproduce
"ddoc":""
fieldContext
I was creating Mango index editor in Couch Photon, and noticed the issue during UI tests.
Your Environment
The text was updated successfully, but these errors were encountered: