Ok it looks like the problem is based around this: In webservice_base_server::run() there is the following:
// init all properties from the request data $this->parse_request(); // authenticate user, this has to be done after the request parsing // this also sets up $USER and $SESSION $this->authenticate_user(); The authenticate_user() method sets $this->auth to be a string like 'TOKEN' But there is also the webservice_rest_client that set an 'auth' variable for it's own use So if using REST auth and the parse_request() fails then we have the wrong $this->auth value set by the looks of things -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1826940 Title: Problem saving info to external_services_logs table Status in Mahara: New Bug description: The 'auth' column is only 10 chars (as it expects one of OTHER, OAUTH, TOKEN, TOKEN_USER, USER) and fails when it tries to save the wstoken value string instead: [DBG] bb (webservice/lib.php:1512) executing: mahara_user_external/update_users [WAR] bb (lib/errors.php:858) Failed to get a recordset: postgres8 error: [-1: ERROR: value too long for type character varying(10)] in EXECUTE("INSERT INTO "external_services_logs" ("id", "timelogged", "userid", "externalserviceid", "institution", "protocol", "auth", "functionname", "timetaken", "uri", "info", "ip") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")Command was: INSERT INTO "external_services_logs" ("id", "timelogged", "userid", "externalserviceid", "institution", "protocol", "auth", "functionname", "timetaken", "uri", "info", "ip") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and values was (id:16877,timelogged:1556571027,userid:8,externalserviceid:3,institution:wdhb,protocol:REST,auth:1234a2fcc061b24432191a1295958600,functionname:mahara_user_update_users,timetaken:0.26598191261292,uri:/webservice/rest/server.php?wstoken=1234a2fcc061b24432191a1295958600,info:exception:WebserviceInvalidParameterExceptionmessage:Invalidparametervaluedetected;executioncannotcontinue.:update_users|in... Call stack (most recent first): * insert_record(string(size 22), object(stdClass), string(size 2), true) at /XXXX/webservice/lib.php:1441 * webservice_base_server->exception_handler(object(WebserviceInvalidParameterException)) at Unknown: To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1826940/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp