You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by eiri <gi...@git.apache.org> on 2016/09/01 13:06:43 UTC

[GitHub] couchdb-couch pull request #193: Fix validation for ddoc and _local id

GitHub user eiri opened a pull request:

    https://github.com/apache/couchdb-couch/pull/193

    Fix validation for ddoc and _local id

    Because binary match treats end of binary as `<<>>` we are validating "_design/" and "_local/" as proper ids.
    
    COUCHDB-3114

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

    $ git pull https://github.com/cloudant/couchdb-couch 3114-fix-docid-validation

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

    https://github.com/apache/couchdb-couch/pull/193.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 #193
    
----
commit 11059ba91b9d262c1b602d0e50e1de048bdf45bf
Author: Eric Avdey <ei...@eiri.ca>
Date:   2016-09-01T12:51:14Z

    Fix validation for ddoc with missing name

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #193: Fix validation for ddoc and _local id

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the issue:

    https://github.com/apache/couchdb-couch/pull/193
  
    try
    ```erlang
     <<"_design/", Rest/binary>> when byte_size(Rest) > 0 -> ok
    ```
    
    That way we only say the _design and _local rule once each. anything else beginning _ will hit the general prohibition clause.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #193: Fix validation for ddoc and _local id

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the issue:

    https://github.com/apache/couchdb-couch/pull/193
  
    hrm, fair enough. I can't see a tidier way to say it once but still give good error messages.
    
    +1.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #193: Fix validation for ddoc and _local id

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the issue:

    https://github.com/apache/couchdb-couch/pull/193
  
    +1


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #193: Fix validation for ddoc and _local id

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the issue:

    https://github.com/apache/couchdb-couch/pull/193
  
    hm, there must be a better way. we now have two bits of special logic in the same function for the same reason.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #193: Fix validation for ddoc and _local id

Posted by eiri <gi...@git.apache.org>.
Github user eiri commented on the issue:

    https://github.com/apache/couchdb-couch/pull/193
  
    @rnewson I did it at first, but then decided to go with less confusing error message for the users sake. If you think it's not a problem here then sure, I'll use guards.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request #193: Fix validation for ddoc and _local id

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-couch/pull/193


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---