Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.3, 3.3.3, 3.4
-
Component/s: Web Services
-
Testing Instructions:
-
Affected Branches:MOODLE_33_STABLE, MOODLE_34_STABLE
-
Fixed Branches:MOODLE_33_STABLE, MOODLE_34_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-59876-master -
Pull Master Diff URL:
Description
I have discovered that user preferences I've introduced in one of my plugin break some web services, because I use illegal characters (such as pipe). When defining such user preferences, I took in consideration the format defined here:
// lib/ajax/setuserpref.php
|
$name = required_param('pref', PARAM_RAW);
|
But some web services define the preferences' key as:
'name' => new external_value(PARAM_ALPHANUMEXT, 'The name of the preferences'),
|
Found in:
- core_user_get_enrolled_users
- And others using core_user::user_description()
The key format expected in the user preferences API should be documented somewhere, and maybe the web services could be made less strict.
(This obviously affect many versions)
Attachments
Issue Links
- is duplicated by
-
MDL-60272 core_user_external::user_description() expects preferences names are always PARAM_ALPHANUMEXT
-
- Closed
-