[
https://issues.apache.org/jira/browse/COUCHDB-3080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415870#comment-15415870
]
ASF subversion and git services commented on COUCHDB-3080:
----------------------------------------------------------
Commit 6b1796f9589eafeb0bc89b4f446915a1a71c7282 in couchdb-couch's branch
refs/heads/master from [~iilyak]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=6b1796f ]
Factor out maybe_remove_extension/1 function
COUCHDB-3080
> couch_db:validate_dbname fails validation for couch file
> --------------------------------------------------------
>
> Key: COUCHDB-3080
> URL: https://issues.apache.org/jira/browse/COUCHDB-3080
> Project: CouchDB
> Issue Type: Bug
> Reporter: ILYA
>
> couch_db:validate_dbname is designed to work for any of the following inputs:
> 1. expects either type binary or list
> 2. expect any kind of database name
> - plain database name
> - plain database name with '.couch' extension
> - shard name with suffix (creation time)
> - shard name with suffix (creation time) and .couch extension
> However apparently it doesn't work correctly for a case when file name is
> given as input (i.e. when it has .couch extension).
> Steps to reproduce:
> {code}
> > couch_db:validate_dbname(<<"something.1415960794">>).
> ok
> > couch_db:validate_dbname(<<"something.1415960794.couch">>).
> {error,{illegal_database_name,<<"something.1415960794.couch">>}}
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)