You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2017/02/06 12:52:29 UTC

svn_config__write

svn_config__write() does:

1346   for (section)
1349     {
1352       SVN_ERR(svn_stream_printf(stream, section_pool, "\n[%s]\n",                                                       
1353                                 section->name));
1354 
1355       for (option)
1361         SVN_ERR(svn_stream_printf(stream, options_pool, "%s=%s\n",
1362                                   option->name, option->value));
1364     }

Does this need to grow some validation?  E.g., check that
the interpolated strings don't contain '\n' or '='?

Even if the current callsite doesn't care, future callsites might.

Re: svn_config__write

Posted by Branko Čibej <br...@apache.org>.
On 06.02.2017 13:52, Daniel Shahaf wrote:
> svn_config__write() does:
>
> 1346   for (section)
> 1349     {
> 1352       SVN_ERR(svn_stream_printf(stream, section_pool, "\n[%s]\n",                                                       
> 1353                                 section->name));
> 1354 
> 1355       for (option)
> 1361         SVN_ERR(svn_stream_printf(stream, options_pool, "%s=%s\n",
> 1362                                   option->name, option->value));
> 1364     }
>
> Does this need to grow some validation?  E.g., check that
> the interpolated strings don't contain '\n' or '='?
>
> Even if the current callsite doesn't care, future callsites might.


It's a private API, so it's never going to be called with some random
user data. I think our test suite is guarantee enough.

-- Brane