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

webservice_login_failed event produces notices in error.log

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Enable developers debugging
      2. Enable WS on the site and REST protocol
      3. Request URL (in browser or curl): http://YOURMOODLESITE/webservice/rest/server.php?moodlewsrestformat=json&get_site_info&wstoken=qwerty
      4. There should be no notices in error.log and the response should look like:

        {"exception":"moodle_exception","errorcode":"invalidtoken","message":"Invalid token - token not found"}
        

      Check logs report - event webservice_login_failed should be logged

      Show
      Enable developers debugging Enable WS on the site and REST protocol Request URL (in browser or curl): http://YOURMOODLESITE/webservice/rest/server.php?moodlewsrestformat=json&get_site_info&wstoken=qwerty There should be no notices in error.log and the response should look like: {"exception":"moodle_exception","errorcode":"invalidtoken","message":"Invalid token - token not found"} Check logs report - event webservice_login_failed should be logged
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      wip-MDL-59992-master

      Description

      When WS authentication fails I can see in error.log:

      Debugging: Context was already set in init() method, ignoring context parameter in 
      * line 214 of /lib/classes/event/base.php: call to debugging()
      * line 1053 of /webservice/lib.php: call to core\\event\\base::create()
      * line 939 of /webservice/lib.php: call to webservice_server->authenticate_by_token()
      * line 1203 of /webservice/lib.php: call to webservice_server->authenticate_user()
      * line 44 of /webservice/rest/server.php: call to webservice_base_server->run()
      

        Attachments

          Activity

            People

            Assignee:
            marina Marina Glancy
            Reporter:
            marina Marina Glancy
            Peer reviewer:
            David Monllaó
            Integrator:
            Dan Poltawski
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Sep/17