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

URL check is too restrictive

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.6.1, 1.6.2, 1.6.3, 1.7
    • Fix Version/s: 1.6.4, 1.7.1, 1.8
    • Component/s: Unknown
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      It is impossible to enter URL with a port number (e.g. http://www.apple.com/main/rss/hotnews/hotnews.rss will work, but not http://www.apple.com:80/main/rss/hotnews/hotnews.rss)

      This happens when a call to clean_param(..., PARAM_URL) is made and the url parameter performed with validateUrlSyntax(). Currently, it does prevent the port number.

      Find below the diff to apply to have the port made available:

      443c443
      < if (!empty($param) && validateUrlSyntax($param, 's?H?S?F?E?u-P-a?I?p?f?q?r?')) {

      > if (!empty($param) && validateUrlSyntax($param, 's?H?S?F?E?u-P-a?I?p-f?q?r?')) {

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            hugues.pisapia Hugues Pisapia
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              17/Jan/07