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

RSS feed autodiscovery fails with ampersands in url

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: RSS
    • Labels:
    • Testing Instructions:
      Hide

      1/ Add a new rss feed block
      2/ Edit the block settings
      3/ Click Add/edit feeds
      4/ Add a new feed
      5/ Put the url: http://news.lancs.ac.uk/Web/_layouts/LUNews/rss.ashx?S=15&C=63
      6/ Ensure autodiscover is enabled
      7/ Add the feed

      Expected Result:
      Feed is added

      Actual Result:
      Feed is not added with an error

      Note that if this process is repeated with step 6 changed so that the feed autodiscovery is disabled the feed is added as expected

      Show
      1/ Add a new rss feed block 2/ Edit the block settings 3/ Click Add/edit feeds 4/ Add a new feed 5/ Put the url: http://news.lancs.ac.uk/Web/_layouts/LUNews/rss.ashx?S=15&C=63 6/ Ensure autodiscover is enabled 7/ Add the feed Expected Result: Feed is added Actual Result: Feed is not added with an error Note that if this process is repeated with step 6 changed so that the feed autodiscovery is disabled the feed is added as expected
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:

      Description

      When an rss feed is added with an ampersand in the URL and the autodiscovery button is checked, Moodle fails to add the feed complaining about invalid mime type. When the autodiscovery button is not checked, this does not happen and the feed is added succesfully. The autodiscovery is there to help users add feeds, not break feeds with the correct url!

      Turns out that this caused by simplepie escaping subscribe_url() and passing the url with ampersands escaped.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Oct/11