CouchDB
  1. CouchDB
  2. COUCHDB-537

CouchDB crashes on unknown builtin reduce function string

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10
    • Fix Version/s: 2.0.0
    • Component/s: Database Core
    • Labels:
      None
    • Environment:

      ubuntu from source 0.10

    • Skill Level:
      New Contributors Level (Easy)

      Description

      For a simple reduce as _sum if i add a space after _sum it crashes.
      Don't know how likely it is to add a space by mistake maybe the input could be trimed ?

        Activity

        greg tappero created issue -
        greg tappero made changes -
        Field Original Value New Value
        Description For a simple reduce as _sum if i add a space after _sum it crashes.
        Don't how wrong it is to add a space by mistake maybe the input could be trimed ?
        For a simple reduce as _sum if i add a space after _sum it crashes.
        Don't know how likely it is to add a space by mistake maybe the input could be trimed ?
        Hide
        Nils Adermann added a comment -

        Rather than trimming the value, this patch throws an error message explaining that the builtin function of that name does not exist. This also helps people who put other kinds of typos in there.

        Show
        Nils Adermann added a comment - Rather than trimming the value, this patch throws an error message explaining that the builtin function of that name does not exist. This also helps people who put other kinds of typos in there.
        Nils Adermann made changes -
        Attachment 0001-Incorrect-builtin-function-names-now-throw-an-error-.patch [ 12443601 ]
        Hide
        Nils Adermann added a comment - - edited

        Updated the patch to include a test. It's also in github if that is of any use: http://github.com/naderman/couchdb/commit/cb1ae200d81d5eaad301ad71fb85d50ccb072904

        Show
        Nils Adermann added a comment - - edited Updated the patch to include a test. It's also in github if that is of any use: http://github.com/naderman/couchdb/commit/cb1ae200d81d5eaad301ad71fb85d50ccb072904
        Nils Adermann made changes -
        Nils Adermann made changes -
        Attachment 0001-Incorrect-builtin-function-names-now-throw-an-error-.patch [ 12443601 ]
        Paul Joseph Davis made changes -
        Skill Level New Contributors Level (Easy)
        Hide
        Jan Lehnardt added a comment -

        Nils, good patch, can you rebase this for master?

        Show
        Jan Lehnardt added a comment - Nils, good patch, can you rebase this for master?
        Hide
        Adam Lofts added a comment -

        I've rebased this patch to master.

        Show
        Adam Lofts added a comment - I've rebased this patch to master.
        Adam Lofts made changes -
        Hide
        Adam Kocoloski added a comment -

        Current status is that master ignores trailing characters (whitespace or otherwise) when looking for builtins. It still doesn't do anything polite when a user sets "reduce": "_randomthing".

        Show
        Adam Kocoloski added a comment - Current status is that master ignores trailing characters (whitespace or otherwise) when looking for builtins. It still doesn't do anything polite when a user sets "reduce": "_randomthing".
        Alexander Shorin made changes -
        Summary reduce string CouchDB crushes for unknown builtin reduce function string
        Alexander Shorin made changes -
        Priority Trivial [ 5 ] Major [ 3 ]
        Hide
        Alexander Shorin added a comment -

        Fix issue summary and raise priority since CouchDB doesn't even returns HTTP 500 response. Just closes connection for case of invalid builtin reduce function call:

        CouchDB:

        {"couchdb":"Welcome","uuid":"df0eb380548d633a317f3b13c99c8f16","version":"1.4.0+build.8d7ab8b","vendor":{"version":"1.4.0+build.8d7ab8b","name":"The Apache Software Foundation"}}
        

        ddoc:

        {
            "_id": "_design/foo", 
            "_rev": "3-f7b8e13dcaf9fbe69a63d2717fbbba16", 
            "language": "javascript", 
            "views": {
                "bar": {
                    "map": "function(doc) {\n  emit(null, doc);\n}", 
                    "reduce": "_foobar"
                }
            }
        }
        

        view call:

        curl -v http://localhost:5984/apps/_design/foo/_view/bar
        * Adding handle: conn: 0x1c67fa0
        * Adding handle: send: 0
        * Adding handle: recv: 0
        * Curl_addHandleToPipeline: length: 1
        * - Conn 0 (0x1c67fa0) send_pipe: 1, recv_pipe: 0
        * About to connect() to localhost port 5984 (#0)
        *   Trying 127.0.0.1...
        * Connected to localhost (127.0.0.1) port 5984 (#0)
        > GET /apps/_design/foo/_view/bar HTTP/1.1
        > User-Agent: curl/7.30.0
        > Host: localhost:5984
        > Accept: */*
        > 
        * Empty reply from server
        * Connection #0 to host localhost left intact
        curl: (52) Empty reply from server
        

        crush log:

        [Tue, 25 Jun 2013 20:38:26 GMT] [info] [<0.487.0>] Starting index update for db: apps idx: _design/foo
        [Tue, 25 Jun 2013 20:38:26 GMT] [error] [emulator] Error in process <0.733.0> with exit value: {function_clause,[{couch_query_servers,builtin_reduce,[reduce,[<<7 bytes>>],[[[null,<<32 bytes>>],{[{<<3 bytes>>,<<32 bytes>>},{<<4 bytes>>,<<34 bytes>>},{<<5 bytes>>,{[{<<6 bytes>>,null},{<<9 bytes>>,1365117683},{<<10 bytes>>,<<25 bytes>>},{<<10 bytes>>,<<25 bytes>>},{<<4 bytes>>,null},{<<4 bytes>>,<<9 bytes>>},{<<4 bytes>>,<<7 bytes>>}]}}]}],[[null,<<32 bytes>>],{[{<<3 bytes>>,<<32 bytes>>},{<<4 bytes>>,<<34 bytes>>},{<<5 bytes>>,{[{<<6 bytes>>,null},{<<9 bytes>>,1365117839},{<<10 bytes>>,<<25 bytes>>},{<<10 bytes>>,<<25 bytes>>},{<<4 bytes>>,null},{<<4 bytes>>,<<9 bytes>>},{<<4 bytes>>,<<7 bytes>>}]}}]}],[[null,<<32 bytes>>],{[{<<3 bytes>>,<<32 bytes>>},{<<4 bytes>>,<<34 bytes>>},{<<5 bytes>>,{[{<<6 bytes>>,null},{<<9 bytes>>,1365117844},{<<10 bytes>>,<<25 bytes>>},{<<10 bytes>>,<<25 bytes>>},{... 
        
        
        [Tue, 25 Jun 2013 20:38:26 GMT] [error] [<0.545.0>] {error_report,<0.31.0>,
                             {<0.545.0>,crash_report,
                              [[{initial_call,
                                 {mochiweb_acceptor,init,
                                  ['Argument__1','Argument__2','Argument__3']}},
                                {pid,<0.545.0>},
                                {registered_name,[]},
                                {error_info,
                                 {error,badarg,
                                  [{erlang,list_to_binary,
                                    [[{couch_query_servers,builtin_reduce,
                                       [reduce,
                                        [<<"_foobar">>],
                                        [[[null,
                                           <<"3f5046939ff05dec5d04747d6b0058c6">>],
                                          {[{<<"_id">>,
                                             <<"3f5046939ff05dec5d04747d6b0058c6">>},
                                            {<<"_rev">>,
                                             <<"1-93d47d1072a9b7c66c35b278eb8a9766">>},
                                            {<<".meta">>,
                                             {[{<<"author">>,null},
                                               {<<"timestamp">>,1365117683},
                                               {<<"created_at">>,
                                                <<"2013-04-05T03:21:23+00:00">>},
                                               {<<"updated_at">>,
                                                <<"2013-04-05T03:21:23+00:00">>},
                                               {<<"user">>,null},
                                               {<<"peer">>,<<"127.0.0.1">>},
                                               {<<"type">>,<<"generic">>}]}}]}],
                                         [[null,
                                           <<"3f5046939ff05dec5d04747d6b0061eb">>],
                                          {[{<<"_id">>,
                                             <<"3f5046939ff05dec5d04747d6b0061eb">>},
                                            {<<"_rev">>,
                                             <<"1-f6374d2b14f1e7164d596a3b030340b3">>},
                                            {<<".meta">>,
                                             {[{<<"author">>,null},
                                               {<<"timestamp">>,1365117839},
                                               {<<"created_at">>,
                                                <<"2013-04-05T03:23:59+00:00">>},
                                               {<<"updated_at">>,
                                                <<"2013-04-05T03:23:59+00:00">>},
                                               {<<"user">>,null},
                                               {<<"peer">>,<<"127.0.0.1">>},
                                               {<<"type">>,<<"generic">>}]}}]}],
                                         [[null,
                                           <<"3f5046939ff05dec5d04747d6b00640a">>],
                                          {[{<<"_id">>,
                                             <<"3f5046939ff05dec5d04747d6b00640a">>},
                                            {<<"_rev">>,
                                             <<"1-8ab18a0c2d7ddc2c8043f65ad7a79e45">>},
                                            {<<".meta">>,
                                             {[{<<"author">>,null},
                                               {<<"timestamp">>,1365117844},
                                               {<<"created_at">>,
                                                <<"2013-04-05T03:24:04+00:00">>},
                                               {<<"updated_at">>,
                                                <<"2013-04-05T03:24:04+00:00">>},
                                               {<<"user">>,null},
                                               {<<"peer">>,<<"127.0.0.1">>},
                                               {<<"type">>,<<"generic">>}]}}]}]],
                                        []],
                                       [{file,"couch_query_servers.erl"},{line,168}]},
                                      {couch_query_servers,reduce,3,
                                       [{file,"couch_query_servers.erl"},{line,138}]},
                                      {couch_mrview_util,'-open_view/5-fun-0-',4,
                                       [{file,"src/couch_mrview_util.erl"},
                                        {line,220}]},
                                      {couch_btree,'-write_node/3-lc$^0/1-0-',5,
                                       [{file,"couch_btree.erl"},{line,362}]},
                                      {couch_btree,write_node,3,
                                       [{file,"couch_btree.erl"},{line,356}]},
                                      {couch_btree,modify_node,4,
                                       [{file,"couch_btree.erl"},{line,325}]},
                                      {couch_btree,query_modify,4,
                                       [{file,"couch_btree.erl"},{line,196}]},
                                      {couch_btree,add_remove,3,
                                       [{file,"couch_btree.erl"},{line,174}]}]],
                                    []},
                                   {couch_httpd,error_info,1,
                                    [{file,"couch_httpd.erl"},{line,807}]},
                                   {couch_httpd,send_error,2,
                                    [{file,"couch_httpd.erl"},{line,912}]},
                                   {couch_httpd,handle_request_int,5,
                                    [{file,"couch_httpd.erl"},{line,365}]},
                                   {mochiweb_http,headers,5,
                                    [{file,"mochiweb_http.erl"},{line,94}]},
                                   {proc_lib,init_p_do_apply,3,
                                    [{file,"proc_lib.erl"},{line,239}]}]}},
                                {ancestors,
                                 [couch_httpd,couch_secondary_services,
                                  couch_server_sup,<0.32.0>]},
                                {messages,[]},
                                {links,[<0.103.0>,#Port<0.3508>]},
                                {dictionary,
                                 [{mochiweb_request_qs,
                                   [{"limit","11"},{"group","true"}]},
                                  {couch_rewrite_count,0},
                                  {mochiweb_request_cookie,
                                   [{"m","34e2"},
                                    {"AuthSession",
                                     "Zm9vOjUxQzlGRjJFOteZB4p-DUsezYMVnW5KtCvYh6B2"}]}]},
                                {trap_exit,false},
                                {status,running},
                                {heap_size,28690},
                                {stack_size,27},
                                {reductions,10333}],
                               []]}}
        
        Show
        Alexander Shorin added a comment - Fix issue summary and raise priority since CouchDB doesn't even returns HTTP 500 response. Just closes connection for case of invalid builtin reduce function call: CouchDB: { "couchdb" : "Welcome" , "uuid" : "df0eb380548d633a317f3b13c99c8f16" , "version" : "1.4.0+build.8d7ab8b" , "vendor" :{ "version" : "1.4.0+build.8d7ab8b" , "name" : "The Apache Software Foundation" }} ddoc: { "_id" : "_design/foo" , "_rev" : "3-f7b8e13dcaf9fbe69a63d2717fbbba16" , "language" : "javascript" , "views" : { "bar" : { "map" : "function(doc) {\n emit( null , doc);\n}" , "reduce" : "_foobar" } } } view call: curl -v http: //localhost:5984/apps/_design/foo/_view/bar * Adding handle: conn: 0x1c67fa0 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 0 (0x1c67fa0) send_pipe: 1, recv_pipe: 0 * About to connect() to localhost port 5984 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 5984 (#0) > GET /apps/_design/foo/_view/bar HTTP/1.1 > User-Agent: curl/7.30.0 > Host: localhost:5984 > Accept: */* > * Empty reply from server * Connection #0 to host localhost left intact curl: (52) Empty reply from server crush log: [Tue, 25 Jun 2013 20:38:26 GMT] [info] [<0.487.0>] Starting index update for db: apps idx: _design/foo [Tue, 25 Jun 2013 20:38:26 GMT] [error] [emulator] Error in process <0.733.0> with exit value: {function_clause,[{couch_query_servers,builtin_reduce,[reduce,[<<7 bytes>>],[[[ null ,<<32 bytes>>],{[{<<3 bytes>>,<<32 bytes>>},{<<4 bytes>>,<<34 bytes>>},{<<5 bytes>>,{[{<<6 bytes>>, null },{<<9 bytes>>,1365117683},{<<10 bytes>>,<<25 bytes>>},{<<10 bytes>>,<<25 bytes>>},{<<4 bytes>>, null },{<<4 bytes>>,<<9 bytes>>},{<<4 bytes>>,<<7 bytes>>}]}}]}],[[ null ,<<32 bytes>>],{[{<<3 bytes>>,<<32 bytes>>},{<<4 bytes>>,<<34 bytes>>},{<<5 bytes>>,{[{<<6 bytes>>, null },{<<9 bytes>>,1365117839},{<<10 bytes>>,<<25 bytes>>},{<<10 bytes>>,<<25 bytes>>},{<<4 bytes>>, null },{<<4 bytes>>,<<9 bytes>>},{<<4 bytes>>,<<7 bytes>>}]}}]}],[[ null ,<<32 bytes>>],{[{<<3 bytes>>,<<32 bytes>>},{<<4 bytes>>,<<34 bytes>>},{<<5 bytes>>,{[{<<6 bytes>>, null },{<<9 bytes>>,1365117844},{<<10 bytes>>,<<25 bytes>>},{<<10 bytes>>,<<25 bytes>>},{... [Tue, 25 Jun 2013 20:38:26 GMT] [error] [<0.545.0>] {error_report,<0.31.0>, {<0.545.0>,crash_report, [[{initial_call, {mochiweb_acceptor,init, ['Argument__1','Argument__2','Argument__3']}}, {pid,<0.545.0>}, {registered_name,[]}, {error_info, {error,badarg, [{erlang,list_to_binary, [[{couch_query_servers,builtin_reduce, [reduce, [<< "_foobar" >>], [[[ null , << "3f5046939ff05dec5d04747d6b0058c6" >>], {[{<< "_id" >>, << "3f5046939ff05dec5d04747d6b0058c6" >>}, {<< "_rev" >>, << "1-93d47d1072a9b7c66c35b278eb8a9766" >>}, {<< ".meta" >>, {[{<< "author" >>, null }, {<< "timestamp" >>,1365117683}, {<< "created_at" >>, << "2013-04-05T03:21:23+00:00" >>}, {<< "updated_at" >>, << "2013-04-05T03:21:23+00:00" >>}, {<< "user" >>, null }, {<< "peer" >>,<< "127.0.0.1" >>}, {<< "type" >>,<< " generic " >>}]}}]}], [[ null , << "3f5046939ff05dec5d04747d6b0061eb" >>], {[{<< "_id" >>, << "3f5046939ff05dec5d04747d6b0061eb" >>}, {<< "_rev" >>, << "1-f6374d2b14f1e7164d596a3b030340b3" >>}, {<< ".meta" >>, {[{<< "author" >>, null }, {<< "timestamp" >>,1365117839}, {<< "created_at" >>, << "2013-04-05T03:23:59+00:00" >>}, {<< "updated_at" >>, << "2013-04-05T03:23:59+00:00" >>}, {<< "user" >>, null }, {<< "peer" >>,<< "127.0.0.1" >>}, {<< "type" >>,<< " generic " >>}]}}]}], [[ null , << "3f5046939ff05dec5d04747d6b00640a" >>], {[{<< "_id" >>, << "3f5046939ff05dec5d04747d6b00640a" >>}, {<< "_rev" >>, << "1-8ab18a0c2d7ddc2c8043f65ad7a79e45" >>}, {<< ".meta" >>, {[{<< "author" >>, null }, {<< "timestamp" >>,1365117844}, {<< "created_at" >>, << "2013-04-05T03:24:04+00:00" >>}, {<< "updated_at" >>, << "2013-04-05T03:24:04+00:00" >>}, {<< "user" >>, null }, {<< "peer" >>,<< "127.0.0.1" >>}, {<< "type" >>,<< " generic " >>}]}}]}]], []], [{file, "couch_query_servers.erl" },{line,168}]}, {couch_query_servers,reduce,3, [{file, "couch_query_servers.erl" },{line,138}]}, {couch_mrview_util,'-open_view/5-fun-0-',4, [{file, "src/couch_mrview_util.erl" }, {line,220}]}, {couch_btree,'-write_node/3-lc$^0/1-0-',5, [{file, "couch_btree.erl" },{line,362}]}, {couch_btree,write_node,3, [{file, "couch_btree.erl" },{line,356}]}, {couch_btree,modify_node,4, [{file, "couch_btree.erl" },{line,325}]}, {couch_btree,query_modify,4, [{file, "couch_btree.erl" },{line,196}]}, {couch_btree,add_remove,3, [{file, "couch_btree.erl" },{line,174}]}]], []}, {couch_httpd,error_info,1, [{file, "couch_httpd.erl" },{line,807}]}, {couch_httpd,send_error,2, [{file, "couch_httpd.erl" },{line,912}]}, {couch_httpd,handle_request_int,5, [{file, "couch_httpd.erl" },{line,365}]}, {mochiweb_http,headers,5, [{file, "mochiweb_http.erl" },{line,94}]}, {proc_lib,init_p_do_apply,3, [{file, "proc_lib.erl" },{line,239}]}]}}, {ancestors, [couch_httpd,couch_secondary_services, couch_server_sup,<0.32.0>]}, {messages,[]}, {links,[<0.103.0>,#Port<0.3508>]}, {dictionary, [{mochiweb_request_qs, [{ "limit" , "11" },{ "group" , " true " }]}, {couch_rewrite_count,0}, {mochiweb_request_cookie, [{ "m" , "34e2" }, { "AuthSession" , "Zm9vOjUxQzlGRjJFOteZB4p-DUsezYMVnW5KtCvYh6B2" }]}]}, {trap_exit, false }, {status,running}, {heap_size,28690}, {stack_size,27}, {reductions,10333}], []]}}
        Hide
        Adam Kocoloski added a comment -

        Still a bug in master, we do have a clear place to validate_ddocs at this point so this ought to be a straightforward fix.

        Show
        Adam Kocoloski added a comment - Still a bug in master, we do have a clear place to validate_ddocs at this point so this ought to be a straightforward fix.
        Adam Kocoloski made changes -
        Assignee Adam Kocoloski [ kocolosk ]
        Adam Kocoloski made changes -
        Fix Version/s 2.0.0 [ 12315572 ]
        Hide
        ASF subversion and git services added a comment -

        Commit edb2c8517485a701ac38ebc8c4de2cd4df5a12a0 in couchdb-couch-mrview's branch refs/heads/537-whitelist-builtin-reduce-funs from Adam Kocoloski
        [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=edb2c85 ]

        Validate named reduce function against whitelist

        COUCHDB-537

        Show
        ASF subversion and git services added a comment - Commit edb2c8517485a701ac38ebc8c4de2cd4df5a12a0 in couchdb-couch-mrview's branch refs/heads/537-whitelist-builtin-reduce-funs from Adam Kocoloski [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=edb2c85 ] Validate named reduce function against whitelist COUCHDB-537
        Hide
        ASF subversion and git services added a comment -

        Commit fc90f2476b6a1dab7b2f0492fdd0a146e0ccf063 in couchdb-couch-mrview's branch refs/heads/537-whitelist-builtin-reduce-funs from Adam Kocoloski
        [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=fc90f24 ]

        Add tests for design document validations

        COUCHDB-537

        Show
        ASF subversion and git services added a comment - Commit fc90f2476b6a1dab7b2f0492fdd0a146e0ccf063 in couchdb-couch-mrview's branch refs/heads/537-whitelist-builtin-reduce-funs from Adam Kocoloski [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=fc90f24 ] Add tests for design document validations COUCHDB-537
        Hide
        ASF GitHub Bot added a comment -

        GitHub user kocolosk opened a pull request:

        https://github.com/apache/couchdb-couch-mrview/pull/20

        Reject unsupported builtin reduce functions

        We reject bad JS code in design documents, but one thing we haven't done is reject design documents that specify unknown builtin reduce functions. This PR addresses that, and adds a few tests to confirm that we do throw exceptions on these conditions.

        COUCHDB-537

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

        $ git pull https://github.com/apache/couchdb-couch-mrview 537-whitelist-builtin-reduce-funs

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

        https://github.com/apache/couchdb-couch-mrview/pull/20.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 #20


        commit edb2c8517485a701ac38ebc8c4de2cd4df5a12a0
        Author: Adam Kocoloski <adam@cloudant.com>
        Date: 2015-07-01T00:55:05Z

        Validate named reduce function against whitelist

        COUCHDB-537

        commit fc90f2476b6a1dab7b2f0492fdd0a146e0ccf063
        Author: Adam Kocoloski <adam@cloudant.com>
        Date: 2015-07-01T01:27:41Z

        Add tests for design document validations

        COUCHDB-537


        Show
        ASF GitHub Bot added a comment - GitHub user kocolosk opened a pull request: https://github.com/apache/couchdb-couch-mrview/pull/20 Reject unsupported builtin reduce functions We reject bad JS code in design documents, but one thing we haven't done is reject design documents that specify unknown builtin reduce functions. This PR addresses that, and adds a few tests to confirm that we do throw exceptions on these conditions. COUCHDB-537 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/couchdb-couch-mrview 537-whitelist-builtin-reduce-funs Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch-mrview/pull/20.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 #20 commit edb2c8517485a701ac38ebc8c4de2cd4df5a12a0 Author: Adam Kocoloski <adam@cloudant.com> Date: 2015-07-01T00:55:05Z Validate named reduce function against whitelist COUCHDB-537 commit fc90f2476b6a1dab7b2f0492fdd0a146e0ccf063 Author: Adam Kocoloski <adam@cloudant.com> Date: 2015-07-01T01:27:41Z Add tests for design document validations COUCHDB-537
        Hide
        ASF subversion and git services added a comment -

        Commit 6343efd6768a3d4d4ff2c6e1b22200f4e4aaca3f in couchdb-couch-mrview's branch refs/heads/537-whitelist-builtin-reduce-funs from Adam Kocoloski
        [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=6343efd ]

        Add tests for design document validations

        COUCHDB-537

        Show
        ASF subversion and git services added a comment - Commit 6343efd6768a3d4d4ff2c6e1b22200f4e4aaca3f in couchdb-couch-mrview's branch refs/heads/537-whitelist-builtin-reduce-funs from Adam Kocoloski [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=6343efd ] Add tests for design document validations COUCHDB-537
        Hide
        Adam Kocoloski added a comment - - edited

        There's a separate issue – we're returning an HTTP 500 when it should be a 400 Bad Request. The error tuple is getting munged somewhere outside of couch_mrview. I think that warrants a separate ticket as it affects all design doc validation failures, not just the one described in this ticket.

        Show
        Adam Kocoloski added a comment - - edited There's a separate issue – we're returning an HTTP 500 when it should be a 400 Bad Request. The error tuple is getting munged somewhere outside of couch_mrview. I think that warrants a separate ticket as it affects all design doc validation failures, not just the one described in this ticket.
        Adam Kocoloski made changes -
        Summary CouchDB crushes for unknown builtin reduce function string CouchDB crashes on unknown builtin reduce function string
        Hide
        ASF subversion and git services added a comment -

        Commit edb2c8517485a701ac38ebc8c4de2cd4df5a12a0 in couchdb-couch-mrview's branch refs/heads/master from Adam Kocoloski
        [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=edb2c85 ]

        Validate named reduce function against whitelist

        COUCHDB-537

        Show
        ASF subversion and git services added a comment - Commit edb2c8517485a701ac38ebc8c4de2cd4df5a12a0 in couchdb-couch-mrview's branch refs/heads/master from Adam Kocoloski [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=edb2c85 ] Validate named reduce function against whitelist COUCHDB-537
        Hide
        ASF subversion and git services added a comment -

        Commit 6343efd6768a3d4d4ff2c6e1b22200f4e4aaca3f in couchdb-couch-mrview's branch refs/heads/master from Adam Kocoloski
        [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=6343efd ]

        Add tests for design document validations

        COUCHDB-537

        Show
        ASF subversion and git services added a comment - Commit 6343efd6768a3d4d4ff2c6e1b22200f4e4aaca3f in couchdb-couch-mrview's branch refs/heads/master from Adam Kocoloski [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=6343efd ] Add tests for design document validations COUCHDB-537
        Hide
        ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/couchdb-couch-mrview/pull/20

        Show
        ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-couch-mrview/pull/20
        Hide
        Adam Kocoloski added a comment -

        The status code bug is COUCHDB-2737, we can resolve this one.

        Show
        Adam Kocoloski added a comment - The status code bug is COUCHDB-2737 , we can resolve this one.
        Adam Kocoloski made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2081d 1h 35m 1 Adam Kocoloski 01/Jul/15 15:18

          People

          • Assignee:
            Adam Kocoloski
            Reporter:
            greg tappero
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development