Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26678

JSON_EQUALS validates invalid JSON and valid JSON as being equal when using a backslash

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 10.7
    • N/A
    • Parser
    • None

    Description

      JSON_EQUALS validates invalid JSON and valid JSON as being equal when using a backslash:

      10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug)

      10.7.0-dbg>SELECT JSON_EQUALS('{"A": 1}', '{"A": 1\}');
      +--------------------------------------+
      | JSON_EQUALS('{"A": 1}', '{"A": 1\}') |
      +--------------------------------------+
      |                                    1 |
      +--------------------------------------+
      1 row in set (0.001 sec)
      

      A simplified version is this (though '{}' is not valid JSON by itself):

      10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug)

      10.7.0-dbg>SELECT JSON_EQUALS('{}', '{\}');
      +--------------------------+
      | json_equals('{}', '{\}') |
      +--------------------------+
      |                        1 |
      +--------------------------+
      1 row in set (0.000 sec)
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.