couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxepal <...@git.apache.org>
Subject [GitHub] couchdb-config pull request: 2708 stronger testing for config set
Date Wed, 03 Jun 2015 12:53:25 GMT
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-config/pull/3#discussion_r31618881
  
    --- 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 --
    
    This will cause a problem with non-latin1 configuration keys/values. By default, printable
range is set to latin1 unless it changed via `+pc` option. The source of problems could be:
admins login and passwords, secrets, oauth credentials, externals and query servers paths
and even vendor 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.
---

Mime
View raw message