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

mod_wiki: Multiple points where title of new page needs to be <=255 chars, but no validation rule present

    XMLWordPrintable

Details

    • Bug
    • Status: Peer review in progress
    • Minor
    • Resolution: Unresolved
    • 3.5.8, 3.6.6, 3.7.2, STABLE backlog
    • None
    • Wiki (2.x)
    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-67102-master-wiki-page-title-charlimit-validation
    • Hide

      Notes: The "New" link can be found easily in a theme_clean based theme. I haven't found it in a theme_boost based theme.

      a)
      1. Enter a wiki
      2. Go to the create page form using "New" (corresponding class: mod_wiki_create_form)
      3. Enter a title longer than 255 characters
      4. Click on "create page"

      b)
      1. Enter a course
      2. Create a new wiki activity
      3. Enter a "First page name" (firstpagetitle) longer than 255 characters
      4. Click on one of the save buttons

      Show
      Notes: The "New" link can be found easily in a theme_clean based theme. I haven't found it in a theme_boost based theme. a) 1. Enter a wiki 2. Go to the create page form using "New" (corresponding class: mod_wiki_create_form) 3. Enter a title longer than 255 characters 4. Click on "create page" b) 1. Enter a course 2. Create a new wiki activity 3. Enter a "First page name" (firstpagetitle) longer than 255 characters 4. Click on one of the save buttons

    Description

      There are multiple points using a wiki where a new page title is required and no validation for the 255 character limit is present.

      a) When creating a new page in mod_wiki (fake example URL: https://replace-with-url.org/mod/wiki/create.php?action=new&swid=168), the form doesn't ensure that the page title is less than 256 characters. This leads to a database error.
      (QA URL: https://qa.moodledemo.net/mod/wiki/create.php?action=new&swid=2)

      b) When creating a new wiki, the form mod_wiki_mod_form doesn't validate the form field firstpagetitle (Fake example URL: https://replace-with-url.org/course/modedit.php?add=wiki&type=&course=8&section=0&return=0&sr=0)

      Attachments

        Activity

          People

            Unassigned Unassigned
            poggenpohlda Daniel Poggenpohl
            Luca Bösch Luca Bösch
            Amaia Anabitarte, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: