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

          Issue Links

            Activity

            Hide
            poltawski Dan Poltawski added a comment -

            Integrators: Note that this can be cherry-picked into master and 20_STABLE

            Show
            poltawski Dan Poltawski added a comment - Integrators: Note that this can be cherry-picked into master and 20_STABLE
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Dan, this has been integrated now and cherry-picked onto 20 and master.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Dan, this has been integrated now and cherry-picked onto 20 and master.
            Hide
            andyjdavis Andrew Davis added a comment -

            Works as expected.

            Sam, this seems like it should be merged to 2.0 stable, 2.1 stable and master. Is that what was done?

            Show
            andyjdavis Andrew Davis added a comment - Works as expected. Sam, this seems like it should be merged to 2.0 stable, 2.1 stable and master. Is that what was done?
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Yip that is what has happened, Dan fixed it on MOODLE_21_STABLE and I've cherry picked it to MOODLE_20_STABLE and master

            Show
            samhemelryk Sam Hemelryk added a comment - Yip that is what has happened, Dan fixed it on MOODLE_21_STABLE and I've cherry picked it to MOODLE_20_STABLE and master
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Sent upstream and closing, many thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Sent upstream and closing, many thanks!

              People

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

                Dates

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