On Tue, Mar 26, 2013 at 10:57 AM, Ivan Zhakov <i...@visualsvn.com> wrote: > We already have svn_fs__path_valid() and validate all incoming FS > paths in fs-loader.c. Current svn_fs__path_valid() implementation is: > [[[ > svn_error_t * > svn_fs__path_valid(const char *path, apr_pool_t *pool) > { > /* UTF-8 encoded string without NULs. */ > if (! svn_utf__cstring_is_valid(path)) > { > return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL, > _("Path '%s' is not in UTF-8"), path); > } > > /* No "." or ".." elements. */ > if (svn_path_is_backpath_present(path) > || svn_path_is_dotpath_present(path)) > { > return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL, > _("Path '%s' contains '.' or '..' element"), > path); > } > > /* That's good enough. */ > return SVN_NO_ERROR; > } > ]]] > > Can we just extend it to prohibit all characters with ascii code < 31 ?
Iterate the characters and use svn_ctype_iscntrl()