Uploaded image for project: 'MariaDB Connector/R2DBC'
  1. MariaDB Connector/R2DBC
  2. R2DBC-124

Ensure a non-UTF8 charset cannot be used for protocol exchanges

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • 1.4.1
    • other
    • None

    Description

      he driver encodes and decodes all character data, assuming the connection character set is UTF-8. The server can, however, announce a change of character_set_client mid-session through the OK-packet session-state-tracking mechanism (e.g. a SET NAMES … run by a stored routine/trigger, server configuration, or a hostile server).

      If the new charset is not UTF-8, the driver keeps reading and writing UTF-8 while the server interprets the same bytes under a different encoding, causing silent data corruption and a client/server charset-confusion mismatch.

      Goal is that once the connection is fully initialized, any subsequent charset change to a value that is not utf8 / utf8mb3 / utf8mb4 is rejected: the driver raises R2dbcNonTransientResourceException (SQLState 08000) and closes the connection rather than continuing to exchange data under a mismatched encoding.

      Reported by fg0x0.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.