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

Provide some backward compatibility for old RSS URLs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: RSS
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Following from MDLSITE-993:

      We should not just kill the old feed URLs, especially if they were open site-level ones originally.

      OLD: http://moodle.org/rss/file.php/1/1/forum/1/rss.xml
      NEW: http://moodle.org/rss/file.php/51/1b51bf7f3cab9689af042af1ff4a07f0/mod_forum/1/rss.xml

      We can't respect the user/course information in the original URL, because this could be very insecure and allow access to information buried anywhere. So some old URLs are just not going to work anymore, especially those inside protected courses.

      My solution:

      • when an old URL is detected, fetch the standard user "guest", construct a new URL and redirect to that URL.
      • with a new URL, if we detect that the current user is guest, and we know that guest does not have access to the context (no items in the RSS feed), then we construct a fake RSS feed that explains the situation

      "This feed uses guest access to access the data, but guest does not have permission to read the data. Visit the original location that this feed comes from (URL) as a valid user and get a new RSS link from there."

        Attachments

          Activity

            People

            • Assignee:
              andyjdavis Andrew Davis
              Reporter:
              dougiamas Martin Dougiamas
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10