Commit 3f05d3f4 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1825894: Ignore extra parameters in webservices

We had a patch for ignoring parameters prefixed with 'custom_' in
bug 1697909 - but there were still problems from users when trying to
install LTI connections.

So we will now ignore any unknown parameter and let the user know by
recording this in the Mahara error log - we however will not be
returning the info about the extra parameters back to the system that
made the webservice call


Change-Id: I0cf5d966833a48e7db13d48b9e0be87285934002
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
(cherry picked from commit 515cfba6)
(cherry picked from commit e39ac7ce)
parent ac0aee9c
......@@ -623,8 +623,10 @@ class external_api {
if (!empty($customkeys) && !get_config('productionmode')) {
log_info(get_string('errorunexpectedcustomkey', 'auth.webservice', $customkeys));
if (!empty($keys)) {
throw new WebserviceInvalidParameterException(get_string('errorunexpectedkey', 'auth.webservice', $keys));
if (!empty($keys) && !get_config('productionmode')) {
// We will stop throwing error on unexpected param keys and instead just show them in error log
// when the site is not in production mode
log_info(get_string('errorunexpectedkey', 'auth.webservice', $keys));
return $result;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment