-
Bug
-
Resolution: Fixed
-
Minor
-
3.11.6
-
MOODLE_311_STABLE
-
MOODLE_311_STABLE
-
The exception thrown when user cannot use the given protocol contains the literal {$a} placeholder that was copied verbatim from the lang string when it was last updated in MDL-33060 (commit), rather than actual content
Original lang string: https://github.com/moodle/moodle/commit/96d3b93ba3ea16b26166b23ef057745726fcbde9#diff-70d03993cea23d9da563d661f4658599a99033c7fa3e8790a8c3d86896cc6dffL139
$ curl --silent "http://localhost:8000/webservice/rest/server.php?moodlewsrestformat=json" --data "wsfunction=core_webservice_get_site_info&wstoken=a00eec09d785a5064b3aaa7c98db4e76" | python -m json.tool
|
{
|
"debuginfo": "You are not allowed to use the {$a} protocol (missing capability: webservice/rest:use)",
|
"errorcode": "accessexception",
|
"exception": "webservice_access_exception",
|
"message": "Access control exception (You are not allowed to use the {$a} protocol (missing capability: webservice/rest:use))"
|
}
|
Replace {$a} with the actual string content, to ensure the thrown exception makes sense
- is a regression caused by
-
MDL-33060 Fix all exceptions with get_string() calls within them
-
- Closed
-