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

Invalid OAuth Signature error when some params are too long and new line is generated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_33_STABLE

      Description

      OAuth signature signing fails on the tool provider side when the LTI activity or Full Site name has long name (containing space characters). The reason is that when signing the parameters in locallib.php:lti_build_request() , few of the parameters are trimmed and html_to_text() function is used. This way, if for example the course->fullname is
      'test test test test test test test test test test test test test test test test test test test test'
      , when building the params this gets converted to:
      'test test test test test test test test test test test test test test test
      test test test test test'

      This all leads to a difference between the base_string, which is signed in Moodle and the one, which is sent to the Provider. I've reproduced it with Course Name and Full Site Name, but pretty sure it can be reproduced with other params, which are built using html_to_text() (search for that function in locallib.php).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ivanrusev Ivan Rusev
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: