You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using couch_peruser it is allowed to set database_prefix with illegal characters for a database name. For us this resulted in CouchDB crashing and being unable to start until we changed the configuration manually in local.ini
Steps to Reproduce
Set up single node CouchDB
Run
curl -H 'Content-Type: application/json' -X PUT http:https://localhost:5984/_node/nonode@nohost/_config/couch_peruser/database_prefix -d '"userdb-.-"'
curl -H 'Content-Type: application/json' -X PUT http:https://localhost:5984/_node/nonode@nohost/_config/couch_peruser/enable -d '"true"'
CouchDB has now crashed, and will crash immediately on restart. The error messages I saw after attempted restart were:
Error: {error,{illegal_database_name,<<"userdb-.-">>}}
[error] 2019-10-31T14:28:37.769379Z nonode@nohost <0.416.0> -------- CRASH REPORT Process couch_peruser (<0.416.0>) with 0 neighbors exited with reason: bad return value {error,{illegal_database_name,<<"userdb-.-">>}} at gen_server:init_it/6(line:356) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {couch_peruser,init,['Argument__1']}, ancestors: [couch_peruser_sup,<0.414.0>], messages: [], links: [<0.415.0>,<0.87.0>], dictionary: [], trap_exit: false, status: running, heap_size: 1598, stack_size: 27, reductions: 1586
[error] 2019-10-31T14:28:37.769649Z nonode@nohost <0.415.0> -------- Supervisor couch_peruser_sup had child couch_peruser started with couch_peruser:start_link() at undefined exit with reason bad return value {error,{illegal_database_name,<<"userdb-.-">>}} in context start_error
[error] 2019-10-31T14:28:37.770164Z nonode@nohost <0.413.0> -------- CRASH REPORT Process (<0.413.0>) with 0 neighbors exited with reason: {{shutdown,{failed_to_start_child,couch_peruser,{bad_return_value,{error,{illegal_database_name,<<"userdb-.-">>}}}}},{couch_peruser_app,start,[normal,[]]}} at application_master:init/4(line:134) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {application_master,init,['Argument__1','Argument__2',...]}, ancestors: [<0.412.0>], messages: [{'EXIT',<0.414.0>,normal}], links: [<0.412.0>,<0.9.0>], dictionary: [], trap_exit: true, status: running, heap_size: 376, stack_size: 27, reductions: 105
[info] 2019-10-31T14:28:37.770459Z nonode@nohost <0.9.0> -------- Application couch_peruser exited with reason: {{shutdown,{failed_to_start_child,couch_peruser,{bad_return_value,{error,{illegal_database_name,<<"userdb-.-">>}}}}},{couch_peruser_app,start,[normal,[]]}}
Expected Behaviour
Setting couch_peruser.database_prefix to a value with invalid database characters will throw an error.
Your Environment
CouchDB Version used: 2.3.1
Operating System and version: Debain 10 (buster)
The text was updated successfully, but these errors were encountered:
Description
When using couch_peruser it is allowed to set database_prefix with illegal characters for a database name. For us this resulted in CouchDB crashing and being unable to start until we changed the configuration manually in local.ini
Steps to Reproduce
Expected Behaviour
Setting
couch_peruser.database_prefix
to a value with invalid database characters will throw an error.Your Environment
The text was updated successfully, but these errors were encountered: