Moodle
  1. Moodle
  2. MDL-29582

missing validation error in web UIs when entering names with leading/trailling spaces.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      1) you shouldn't be allowed to proceed unless there are no leading/trailing spaces in firstname lastname fields when creating /editing users.

      Show
      1) you shouldn't be allowed to proceed unless there are no leading/trailing spaces in firstname lastname fields when creating /editing users.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Rank:
      19095

      Description

      This issue is to decide IF we need validation errors when entering leading/trailing spaces in firstname and lastname via the GUI form.

      This is following on from MDL-25027 where we remove the trimming of data from external source to make it consistent with GUI at the moment and also to stop mangling incoming data.
      The GUI could possibly be doing validations on upon new entry or edit of data.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Is this only affecting code in the Master branch?

          Show
          Michael de Raadt added a comment - Is this only affecting code in the Master branch?
          Hide
          Aparup Banerjee added a comment -

          ah missed that, thanks, stable 2.x branches too, updated affected versions

          Show
          Aparup Banerjee added a comment - ah missed that, thanks, stable 2.x branches too, updated affected versions
          Hide
          Aparup Banerjee added a comment -

          Closing, does not seem to be a bug - it seems by design and is currently allowed in stable and master.

          Show
          Aparup Banerjee added a comment - Closing, does not seem to be a bug - it seems by design and is currently allowed in stable and master.
          Hide
          Olja Petrovic added a comment - - edited

          Could it be possible to at least trim leading/trailing spaces from the firstname and lastname?
          I was getting strange behaviour when searching user by firstname/lastname initial and the name started with a space.
          Why not trim?
          At least we could make it optional, if admin wants can activate the trimming.

          Show
          Olja Petrovic added a comment - - edited Could it be possible to at least trim leading/trailing spaces from the firstname and lastname? I was getting strange behaviour when searching user by firstname/lastname initial and the name started with a space. Why not trim? At least we could make it optional, if admin wants can activate the trimming.
          Hide
          Aparup Banerjee added a comment -

          Hi Olja,
          the problem is STABLE branches that are used out there with other systems must maintain this consistency. so it is a legacy issue on the stable branches.

          Show
          Aparup Banerjee added a comment - Hi Olja, the problem is STABLE branches that are used out there with other systems must maintain this consistency. so it is a legacy issue on the stable branches.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: