[
https://issues.apache.org/jira/browse/COUCHDB-2666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14535237#comment-14535237
]
ASF GitHub Bot commented on COUCHDB-2666:
-----------------------------------------
GitHub user iilyak opened a pull request:
https://github.com/apache/couchdb-chttpd/pull/35
Escape database name on posts to _replicate
Currently we convert local references of source/target specified in
JSON body into URLs.
This commit escapes database name. So slashes in name could be used.
COUCHDB-2666
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/iilyak/couchdb-chttpd
2666-dbname-escape-for-replication
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-chttpd/pull/35.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #35
----
commit 1f748170a1273a00faebdb912c94ad5120e98f59
Author: ILYA Khlopotov <[email protected]>
Date: 2015-05-08T18:41:10Z
Escape database name on posts to _replicate
Currently we convert local references of source/target specified in
JSON body into URLs.
This commit escapes database name. So slashes in name could be used.
COUCHDB-2666
----
> Regression: inproper local database name escape on /_replicate
> --------------------------------------------------------------
>
> Key: COUCHDB-2666
> URL: https://issues.apache.org/jira/browse/COUCHDB-2666
> Project: CouchDB
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: HTTP Interface, Replication
> Reporter: Alexander Shorin
> Assignee: ILYA
> Priority: Blocker
> Labels: regression
> Fix For: 2.0.0
>
>
> {code}
> $ curl -XPUT http://localhost:15984/foo%2fbar
> {"ok":true}
> $ curl -XPOST http://localhost:15984/_replicate -d '{"source": "foo/bar",
> "target": "baz", "create_target": true}' -H "Content-Type: application/json"
> {"error":"db_not_found","reason":"could not open
> http://127.0.0.1:15984/foo/bar/"}
> {code}
> Meanwhile in 1.6.1:
> {code}
> $ curl -XPUT http://localhost:5984/foo%2fbar
> {"ok":true}
> $ curl -XPOST http://localhost:5984/_replicate -d '{"source": "foo/bar",
> "target": "baz", "create_target": true}' -H "Content-Type: application/json"
> {"ok":true,"no_changes":true}
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)