On Mon, 25 May 2026 at 21:04, Branko Čibej <[email protected]> wrote:
[...]


> But author remains in UTF-8? The author name is extracted from properties,
> I don't recall if we enforce UTF-8 in svn:author. I know that we do in
> svn:log.
>
>
All svn: properties should be valid UTF-8 string with LF line endings. It's
enforced in svn_repos__validate_prop():
[[[
  /* Validate "svn:" properties. */
  if (svn_prop_is_svn_prop(name) && value != NULL)
    {
      /* Validate that translated props (e.g., svn:log) are UTF-8 with
       * LF line endings. */
      if (svn_prop_needs_translation(name))
        {
          if (!svn_utf__is_valid(value->data, value->len))
            {
              return svn_error_createf
                (SVN_ERR_BAD_PROPERTY_VALUE, NULL,
                 _("Cannot accept '%s' property because it is not encoded
in "
                   "UTF-8"), name);
            }

          /* Disallow inconsistent line ending style, by simply looking for
           * carriage return characters ('\r'). */
          if (strchr(value->data, '\r') != NULL)
            {
              svn_error_t *err = svn_error_createf
                (SVN_ERR_BAD_PROPERTY_VALUE_EOL, NULL,
                 _("Cannot accept non-LF line endings in '%s' property"),
                   name);

              return svn_error_create(SVN_ERR_BAD_PROPERTY_VALUE, err,
                                      _("Invalid property value"));
            }
        }
]]]

As far as I remember the server can ignore this check only during svnadmin
load.

-- 
Ivan Zhakov

Reply via email to