Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4400

Signup: Invalid parameter value if username contains spaces

XMLWordPrintable

    • Hide

      This issue only needs to be tested in 1 device.

      Test in a 4.4 (master) site

      1. Login as admin in browser and make sure extendedusernamechars is disabled.
      2. In the app, go to create a new account in the site.
      3. In the username, write an invalid character like "$". Check that an error appears saying "The username can only contain alphanumeric lowercase characters (letters and numbers), underscore (_), hyphen , period (.) or at symbol (@)". 
      4. As admin in browser, enable extendedusernamechars.
      5. In the app, leave the create account page and open it again.
      6. In the username, write an uppercase letter. Check that an error appears saying "Only lowercase letters allowed". 
      7. In the username, remove the uppercase letter and write a character like "$". Check that no error is displayed.
      8. Fill the rest of the form and submit it. Check that no error is displayed and the account is created.

      Test in a 4.3 or older site

      1. Login as admin in browser and make sure extendedusernamechars is disabled.
      2. In the app, go to create a new account in the site.
      3. In the username, write a character like "$". Check that no error is displayed (we cannot know if the character is valid or not). Writing an uppercase character will show an error because they are never allowed.
      4. Fill the rest of the form and submit it. Check that an "Invalid parameter" error is displayed. We cannot know if this error is because of the username or not, so we decided to keep it like this.
      Show
      This issue only needs to be tested in 1 device. Test in a 4.4 (master) site Login as admin in browser and make sure extendedusernamechars is disabled. In the app, go to create a new account in the site. In the username, write an invalid character like "$". Check that an error appears saying "The username can only contain alphanumeric lowercase characters (letters and numbers), underscore (_), hyphen , period (.) or at symbol (@)".  As admin in browser, enable extendedusernamechars. In the app, leave the create account page and open it again. In the username, write an uppercase letter. Check that an error appears saying "Only lowercase letters allowed".  In the username, remove the uppercase letter and write a character like "$". Check that no error is displayed. Fill the rest of the form and submit it.  Check that no error is displayed and the account is created. Test in a 4.3 or older site Login as admin in browser and make sure extendedusernamechars is disabled. In the app, go to create a new account in the site. In the username, write a character like "$". Check that no error is displayed (we cannot know if the character is valid or not). Writing an uppercase character will show an error because they are never allowed. Fill the rest of the form and submit it. Check that an "Invalid parameter" error is displayed. We cannot know if this error is because of the username or not, so we decided to keep it like this.
    • MOODLE_404_STABLE
    • Moodle Apps - 2024 i1.1, Moodle Apps - 2024 i1.2

      If user tries to create one account with username with spaces it's breaks all

       

      Maybe fix can be 

       
      username: this.signupForm.value.username.trim().toLowerCase(),

      to -->
      username: this.signupForm.value.username.trim().toLowerCase().split(' ').join(''),

      In the file --> src/core/features/login/pages/email-signup/email-signup.ts

      EDIT: This issue seems to affect the "Lost password" form too.

            dpalou Dani Palou
            kenelope Kene lope
            Pau Ferrer Pau Ferrer
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.