Skip to content

/_{db}/_ensure_full_commit returns success for non-existent databases #1585

@flimzy

Description

@flimzy

If I attempt to call the _ensure_full_commit endpoint for a database with a name beginning with the '_' character, I get (fake) success, rather than 404.

Expected Behavior

I expect a 404, as I get for a db with a standard name. Example:

curl -X POST http://admin:abc123@localhost:6004/foo/_ensure_full_commit -H 'Content-Type: application/json'
{"error":"not_found","reason":"Database does not exist."}

Current Behavior

Apparent success, even though the database _foo does not exist.

curl -X POST http://admin:abc123@localhost:6004/_foo/_ensure_full_commit -H 'Content-Type: application/json'
{"ok":true,"instance_start_time":"0"}

Context

Observed on CouchDB 2.2.0, but not on 2.1.1 and older. Tested using Docker images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions