Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31555

In webservice functions, with REST protocol, doesn't accept URLecoded character in value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
    • Environment:
      Linux with pt_BR locale
    • Testing Instructions:
      Hide

      in linux with curl

      curl -d "wstoken=XXXX&wsfunction=core_user_update_users&users%5B0%5D%5Bid%5D=USERID&&users%5B0%5D%5Bfirtsname%5D=Jos%E9%20Maria

      where XXXX is your token, ans USERID is the user id

      Show
      in linux with curl curl -d "wstoken=XXXX&wsfunction=core_user_update_users&users%5B0%5D%5Bid%5D=USERID&&users%5B0%5D%5Bfirtsname%5D=Jos%E9%20Maria where XXXX is your token, ans USERID is the user id
    • Workaround:
      Hide

      Try to use other protocol, if possible

      Show
      Try to use other protocol, if possible
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      In web services functions, with "REST" protocol , doesn't accept URLecoded characters in the value

      example:
      users[0][id]=2&users[0][firtsname]=José Maria

      in URLencode will be
      users%5B0%5D%5Bid%5D=2&users%5B0%5D%5Bfirtsname%5D=Jos%E9%20Maria

      The name part ( users%5B0%5D%5Bfirtsname%5D ) its ok, doesn't have any problem, but in the value part (Jos%E9%20Maria),it's returning an exception message, "Invalid parameter value detected"

      <EXCEPTION class="invalid_parameter_exception">
      <MESSAGE>Invalid parameter value detected</MESSAGE>
      <DEBUGINFO></DEBUGINFO>
      </EXCEPTION>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jerome Jérôme Mouneyrac
              Reporter:
              bozohrj Carlos Alexandre S. da Fonseca
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: