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

email addresses not trimmed on registration and thrown away when editing profile

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Go to Plugins ▶ Authentication ▶ Manage authentication and enable 'Email based self-registration' in registerauth
      2. Logout
      3. Click login and select the option to create a new account
      4. Fill in the registration form all details and with your email address - but add whitespace at the end of your email address
      5. VERIFY: your registration form is accepted
      6. Fill in the registration form again - but this time set the email address as '<foo>@gmail.com'
      7. VERIFY: that the form doesn't allow your email address to be submitted and tells you its invalid.
      8. Go to the forgotten password form, repeat the test with an email address with spaces at the end. Verify it accepts that
      9. Go to the forgotten password form, repeat the test with '<foo>@gmail.com'. Verify it does not accept that
      10. As admin try and create a new user and repeat the same tests with the two email variations
      11. VERIFY: valid email is accepted even with whitespace
      12. VERIFY: invalid email is not accepted - and the invalid input remains in the form
      13. As a student try and edit your user profile with two email variations
      14. VERIFY: valid email is accepted even with whitespace
      15. VERIFY: invalid email is not accepted - and the invalid input remains in the form
      Show
      Go to Plugins ▶ Authentication ▶ Manage authentication and enable 'Email based self-registration' in registerauth Logout Click login and select the option to create a new account Fill in the registration form all details and with your email address - but add whitespace at the end of your email address VERIFY: your registration form is accepted Fill in the registration form again - but this time set the email address as '<foo>@gmail.com' VERIFY: that the form doesn't allow your email address to be submitted and tells you its invalid. Go to the forgotten password form, repeat the test with an email address with spaces at the end. Verify it accepts that Go to the forgotten password form, repeat the test with '<foo>@gmail.com'. Verify it does not accept that As admin try and create a new user and repeat the same tests with the two email variations VERIFY: valid email is accepted even with whitespace VERIFY: invalid email is not accepted - and the invalid input remains in the form As a student try and edit your user profile with two email variations VERIFY: valid email is accepted even with whitespace VERIFY: invalid email is not accepted - and the invalid input remains in the form
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-46976-master

      Description

      If you create a user and type in a new email address spaces are not trimmed during sanity checks. This might be useful because on mobile devices people use auto completion and that usually adds a space after a completed word (address). It is not obvious to see what's wrong with an address that has a space at the end because it's invisible. So trimming might be the solution to this.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  2/Feb/15