Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-2195

Email-based authentication failed if username contains space

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: Authentication
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • Affected Branches:
      MOODLE_14_STABLE

      Description

      If Moodle uses the Email-based authentication feature, user registration will fail with many Email clients if the new user uses a space as part of its username.

      1) Select New account. signup.php will display a form.

      2) Enter a username containing a space into the username-field, e.g. Hennecke Martin

      3) Fill in the other fields

      Moodle now sends the Email to the given address. It contains a link to the confirmation page (confirm.php), e.g.:

      http://www.learn.uni-hildesheim.de/moodle/login/confirm.php?p=8HrXguzP5SWGGHx&s=hennecke martin

      Most eMail clients will underline this, starting from http ending at hennecke. martin won't be underlined (and won't be part of the URL entered to the browser if the user follows the link).

      Either the registration will fail without notice or with a welcome of the user hennecke. (We had a couple of problems with people like Tim Schmidt (username: Tim) and Tim Meyer (username: Tim Meyer).

      Solution:

      Escape (encode) the URL bevor sending the mail, e.g.:

      http://www.learn.uni-hildesheim.de/moodle/login/confirm.php?p=8HrXguzP5SWGGHx&s=hennecke%20martin

      (see %20)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              imported Imported
              Tester:
              Nobody Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: