OOPS cause by security check on milestones with missing series_target

Bug #401157 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Curtis Hovey

Bug Description

 I cannot see the Launchpad Registry's milestones page on edge (OOPS-1295EB222), and I believe the reason is because the 2.1.x milestones do not have a series.
    https://edge.launchpad.net/launchpad-registry/+milestones
    https://edge.launchpad.net/launchpad-registry/+milestone/2.1.11

But I note that I can see these same pages on on lpnet:
    https://launchpad.net/launchpad-registry/+milestones
    https://launchpad.net/launchpad-registry/+milestone/2.1.11

The breakage is caused by a change to give the release manager edit permission. The Milestone's series_target.driver is tested. This series_target should never be None, but it clearly is in the case of the 2.1.x milestones. See bug

The work-around is to update security.EditMilestoneByTargetOwnerOrAdmins to check that there is a series_target before accessing the driver.
        if (self.obj.series_target is not None
            and user.inTeam(self.obj.series_target.driver)):
            # The user is a release manager.
            # XXX sinzui 2009-07-18 bug=40978: The series_target should never
            # be None, but Milestones in the production DB are like this.
            return True

Revision history for this message
Curtis Hovey (sinzui) wrote :

Fixed in launchpad devel r8959.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: story-series-milestones-releases
Revision history for this message
Curtis Hovey (sinzui) wrote : Bug 401157 Fix released

Fixed released in Launchpad 2.2.7.

Changed in launchpad-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.