GitHub user jinroh opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/784

    Fix database name escaping

    When having a database with the character `-` in addition with a URI 
escaped character `$ `, `+` or `/`, the name was URI escaped twice and the 
fetch of the database resources could not succeed.
    
    For instance:
    
    ```js
    safeURLName(safeURLName("foo-bar/baz")) // foo-bar%252Fbaz (should be 
foo-bar%2Fbaz)
    safeURLName(safeURLName("foo-bar+baz")) // foo-bar%252Bbaz (should be 
foo-bar%2Bbaz)
    ```
    
    This PR makes `utils.safeURLName` indempotent to fix this issue.
    Also the code was testing for the character `,` which is not allowed by 
couch, I removed it form the regex.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jinroh/couchdb-fauxton 
fix-database-url-name-escaping

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/784.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 #784
    
----
commit f608f974eacc0807be6c12cb9e46c7beacddcf71
Author: Pierre Guilleminot <pierre.guillemi...@gmail.com>
Date:   2016-10-12T17:48:42Z

    Fix database id escaping (make safeURLName idempotent)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to