Send a Referer header when making POST requests to Launchpad

Bug #540212 reported by Leonard Richardson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Expired
Undecided
Unassigned

Bug Description

Bug 538097 was caused by a Launchpad change to reject incoming POST requests that lack a Referer header. The fix is an apport-specific hack in Launchpad (bug 539156 tracks the hack). We'd like you to start sending a Referer header when POSTing to /+blobstore, and in any other POSTs you make to the Launchpad web site (as opposed to the web service). Any reasonable value for the Referer header is fine; in similar situations, I've used the Launchpad website's root URL.

If you can get this fix into Lucid, we'll be able to get rid of the apport-specific hack in a year; otherwise we'll be keeping it until 2015.

summary: - Send a Referer header when making requests to Launchpad
+ Send a Referer header when making POST requests to Launchpad
Revision history for this message
Martin Pitt (pitti) wrote :

Sorry that I only saw this just now. What would be an example value for the "Referrer" header field? Is there any syntax/convention there?

The upload happens like

    opener = urllib2.build_opener(HTTPSProgressHandler, multipartpost_handler.MultipartPostHandler)
    url = 'https://%s/+storeblob' % hostname
    result = opener.open(url,
        { 'FORM_SUBMIT': '1', 'field.blob': blob })
    ticket = result.info().get('X-Launchpad-Blob-Token')

right now. Do you happen to know how to add a header field in between there? (If not, don't worry, I'll do some RTFM)

Changed in apport:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Apport because there has been no activity for 60 days.]

Changed in apport:
status: Incomplete → Expired
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.