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

JSON_QUOTE and JSON_UNQUOTE do not check the validity of input data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 13.1
    • N/A
    • JSON
    • None
    • Not for Release Notes

    Description

      Hi,

      I found that JSON_QUOTE and JSON_UNQUOTE do not check the validity of input data.

      This is an example:

      SELECT JSON_VALID(POINT(1,1)); -- 0
      SELECT JSON_QUOTE(POINT(1,1)); -- "\u0000\u0000\u0000\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000ð?\u0000\u0000\u0000\u0000\u0000\u0000ð?"
      SELECT JSON_UNQUOTE(POINT(1,1)); -- �?�?
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ChiZhang Chi Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.