Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22437

JSON decode result is not checked in the input parser

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.3
    • Component/s: Platform > REST API v2
    • Labels:
      None

      Description

      The current REST JSON input parser only calls the json_decode() PHP function without any further checking. As a result, if the JSON is invalid, you only get an error message due to NULL being used as an array.

        Issue Links

          Activity

          Show
          Damien Pobel (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/768
          Show
          Damien Pobel (Inactive) added a comment - Fixed in ezpublish-kernel: master: http://github.com/ezsystems/ezpublish-kernel/commit/8e6f5fe5df6e6860c81075b3413a0fea78de66b2
          Hide
          Damien Pobel (Inactive) added a comment -

          the added code only checks the syntax of the input like it's done when you use XML as input.

          Show
          Damien Pobel (Inactive) added a comment - the added code only checks the syntax of the input like it's done when you use XML as input.
          Hide
          Marcos Loureiro (Inactive) added a comment -

          QA Approved

          Show
          Marcos Loureiro (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Damien Pobel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 45 minutes
                4h 45m