Skip to content

Enforce UTF-8 encoding of strings more stringently #3531

Open

Description

@danielmewes

This is a follow-up of #1181

@gchpaco implemented UTF-8 validation and it is currently applied to strings coming from the user.
The next step is to make split not generate illegal UTF-8 out of a valid UTF-8 string, see #2518

After that we can consider enforcing correct UTF-8 encoding on all ReQL strings.
An important question is how to handle backwards compatibility with existing tables though.

Activity

  1. added this to the backlog milestone on Jan 8, 2015
  2. mlucy commented on Jan 9, 2015

    @mlucy
    Member

    @danielmewes -- I would vote for having this scheduled more aggressively than backlog. Having an internal command which can generate data that we reject with an error is pretty bad. Would you be opposed to bumping this up a bit?

  3. danielmewes commented on Jan 9, 2015

    @danielmewes
    MemberAuthor

    @mlucy The only remaining command I'm aware of that can generate illegal UTF-8 is split. Can you think of others?
    I think once we are sufficiently sure that there's no way to generate any new illegal UTF-8 string, we are good for the time being and also disallowing existing non-UTF-8 data has a lower priority.

    @gchpaco has a fix for split which is just waiting on figuring out some library/linking questions. It will ship with 1.16 or 2.0. #2518

  4. mlucy commented on Jan 9, 2015

    @mlucy
    Member

    The only risks that come to mind are upcase/downcase, match, js, and http.

  5. danielmewes commented on Jan 9, 2015

    @danielmewes
    MemberAuthor

    We've checked upcase / downcase, and I think @gchpaco determined that match / RE2 was UTF-8 aware as well.
    http is tracked in #2950
    js indeed needs investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions