-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
3.7.4, 3.8, 3.9
-
MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
A little bit of history of the validation of profile fields shortnames:
- Originally only PARAM_ALPHANUM was allowed.
- In
MDL-63068we switched PARAM_TEXT plus some extra validation in define_validate_common() to ensure that only [a-zA-Z0-9_] are allowed. - No matter the clear note, there are some issues (not critical for now, because they are readers/getters that are adhering to the PARAM_TEXT trend. Last case is
MDL-67641.
So, this issue just proposes to change that PARAM_TEXT to PARAM_ALPHANUMEXT, knowing that the later also allows "-" (and define_validate_common() will continue controlling it). But, at very least, will prevent the proliferation of PARAM_TEXT that are way too much for this case.
Ciao
PS: BTW, I've already seen a couple of cases (recently) where we want to just enable {{[a-zA-Z0-9_] }} maybe we should consider adding some new type or adding some "extra" param to allow the regular expressions to be dynamically expanded when some more char is allowed.... note this is a side idea, it doesn't belongs strictly to this issue.
- has a non-specific relationship to
-
MDL-63068 Custom Profile Field Shortnames Getting Silently re-written
-
- Closed
-
-
MDL-67641 auth_email_get_signup_settings: Invalid response if profilefield shortname has underscore
-
- Closed
-
- has been marked as being related by
-
MDL-68120 Extend PARAM to add some extra options to expand dynamically the regular expressions
-
- Closed
-