Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-3379

Login problem with REST interface

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When you try to login with 2.1, the handle() function in CRM/Utils/REST.php has a condition that checks to make sure there are three elements to the argument string. The login function only requires 2, unlike all other functions (since it doesn't check for the key).

      The problems is in line 194.
      The version I checked out a couple weeks ago is:
      if ( count( $args ) != 3 ) {

      My edited version is:
      if ( count( $args ) != 3 && ( $args[1] != 'login' ) ) {

      This seems to resolve the problem. Sorry I don't have a proper development environment at the moment, so I can't provide a patch file.

        Attachments

          Activity

            People

            • Assignee:
              shot Piotr Szotkowski
              Reporter:
              acrosman Aaron Crosman
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: