replicate-couchdb-cluster icon indicating copy to clipboard operation
replicate-couchdb-cluster copied to clipboard

Unable to handle Databases with a slash in the name

Open jeremysgitty opened this issue 7 years ago • 3 comments

Nice library by the way, works very well from what I have seen so far.

We have recently encountered a problem though in an environment where the database names exist with a '/', and the names aren't being escaped.

For example, db name = 'abc/001/123/333', to enable couchdb to handle the slashes need to be turned into '%2F' such as 'abc%2F001%2F123%2F333'.

Cheers, look forward to hearing from you.

jeremysgitty avatar Jun 27 '18 03:06 jeremysgitty

Hey @jeremysgitty! I haven't confirmed that this is an issue, but if what you say is correct then I think the proper solution is to modify slouch so that calls involving the DB correctly encode the DB name. At a minimum, this would be all the slouch calls in https://github.com/redgeoff/replicate-couchdb-cluster/blob/master/scripts/cluster.js.

If you need help creating a PR for slouch then please let me know.

redgeoff avatar Jun 27 '18 04:06 redgeoff

I confirm this is a problem. Added issue in slouch https://github.com/redgeoff/slouch/issues/134

grahamsnz avatar Sep 23 '20 03:09 grahamsnz

I confirm that the fix proposed in https://github.com/redgeoff/replicate-couchdb-cluster/pull/48 fixes this issue.

grahamsnz avatar Oct 03 '20 04:10 grahamsnz