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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.5.8, 3.6.6, 3.7.2, STABLE backlog
    • Wiki (2.x)
    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-67102-master-wiki-page-title-charlimit-validation
    • Hide
      1. Enter a course
      2. Create a new wiki activity
      3. Enter a "First page name" (firstpagetitle) of:

        my wiki with an extremely long name. The name is longer than 255 characters,if you can believe it! It's really hard to make up a name with >= 255 characters and I really don't know why anyone ever would. It is utter madness! Surely no-one would ever consider doing this!
        

      4. Click on one of the save buttons
        1. Confirm that there were no errors
      5. Click on the link
      6. Click on "create page"
        1. Confirm that there were no errors
      Show
      Enter a course Create a new wiki activity Enter a "First page name" (firstpagetitle) of: my wiki with an extremely long name. The name is longer than 255 characters,if you can believe it! It's really hard to make up a name with >= 255 characters and I really don't know why anyone ever would. It is utter madness! Surely no-one would ever consider doing this! Click on one of the save buttons Confirm that there were no errors Click on the link Click on "create page" Confirm that there were no errors

      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)

            Unassigned Unassigned
            poggenpohlda Daniel Poggenpohl
            Andrew Lyons Andrew Lyons
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 40 minutes
                40m

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