Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-107821

JSON /user/update-portrait is throwing "Syntax error! Invalid char"

    Details

      Description

      Reproduction steps:

      1. Start the server
      2. Create a new user, note down it's userId.
      3. Send a POST API call to api/jsonws/user/update-portrait with the following 2 parameters:
      -userId (the user you created)
      -bytes (place any image here)

      Expected behavior: user portrait gets changed to the uploaded file.

      Actual behavior: "Syntax error!", the image doesn't get uploaded.

      API request response:

      {    "exception""Syntax error! Invalid char: C\noffset: 1 near: \"[C:\\Tickets...\"",    "throwable": "jodd.json.JsonException: Syntax error! Invalid char: C\noffset: 1 near: \"[C:\\Tickets...\"",    "error": {        "message": "Syntax error! Invalid char: C\noffset: 1 near: \"[C:\\Tickets...\"",        "type": "jodd.json.JsonException"    }}

       

      Log error:

      2020-01-16 15:21:07.301 ERROR [http-nio-8080-exec-9][JSONWebServiceServiceAction:114] Syntax error! Invalid char: C_offset: 1 near: "[C:\Tickets..." [Sanitized]

      I used Postman for the API calls, but any API client should work.

        Attachments

          Activity

            People

            Assignee:
            michael.eguina Michael Eguina (Inactive)
            Reporter:
            istvan.dezsi Istvan Dezsi
            Participants of an Issue:
            Recent user:
            Tomáš Polešovský
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 31 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP90
                7.0.10.13 DXP SP13
                7.0.X
                7.1.10 DXP FP17
                7.1.10.4 SP4
                7.1.X
                7.2.10 DXP FP5
                7.2.10.2 DXP SP2
                7.2.X
                7.3.1 CE GA2
                7.3.2 CE GA3
                7.3.10 DXP GA1
                Master