couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnewson <...@git.apache.org>
Subject [GitHub] couchdb-config pull request: 2708 stronger testing for config set
Date Thu, 04 Jun 2015 14:52:44 GMT
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-config/pull/3#discussion_r31727769
  
    --- Diff: src/config.erl ---
    @@ -177,9 +182,19 @@ delete(Section, Key, Reason) ->
     
     delete(Sec, Key, Persist, Reason) when is_binary(Sec) and is_binary(Key) ->
         delete(binary_to_list(Sec), binary_to_list(Key), Persist, Reason);
    -delete(Section, Key, Persist, Reason) when is_list(Section), is_list(Key) ->
    +delete(Section, Key, Persist, Reason) when is_boolean(Persist) ->
    +    assert_string(Section),
    +    assert_string(Key),
    +    if Reason == nil -> ok; true -> assert_string(Reason) end,
         gen_server:call(?MODULE, {delete, Section, Key, Persist, Reason}).
     
    +assert_string(Term) ->
    +    case io_lib:printable_list(Term) of
    --- End diff --
    
    I think non-latin would trip bugs in all those areas, isn't it safer to exclude them here?


---
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.
---

Mime
View raw message