Allow Mozilla Messaging extension F1 to use install.php

VERIFIED FIXED in 5.12.3

Status

defect
VERIFIED FIXED
9 years ago
3 years ago

People

(Reporter: formerly-j-r-burke, Assigned: clouserw)

Tracking

unspecified
5.12.3

Details

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
I would like this add-on:
https://addons.mozilla.org/en-US/firefox/addon/252539/

to be able to use install.php such that this URL:
https://addons.mozilla.org/services/install.php?addon_id=252539&src=external-f1home,

will end up redirecting back to:
http://f1.mozillamessaging.com
This is just adding a new regex constant to http://svn.mozilla.org/addons/trunk/site/app/webroot/services/install.php. We can add it to the defaults array as well.
Target Milestone: --- → 5.12.3
(Assignee)

Comment 2

9 years ago
Posted patch fixSplinter Review
Assignee: nobody → clouserw
Attachment #489733 - Flags: review?(fligtar)
Comment on attachment 489733 [details] [diff] [review]
fix

Looks good, but the specific add-on part is unnecessary; by adding it to the default referrers it can install any AMO-hosted add-on by passing the id.
Attachment #489733 - Flags: review?(fligtar) → review+
(Assignee)

Comment 4

9 years ago
oh!  well, then, I'll just do that.  r77301.  thanks
Status: NEW → RESOLVED
Last Resolved: 9 years ago
OS: Mac OS X → Windows 7
Resolution: --- → FIXED
I forget how to test this; https://addons.mozilla.org/services/install.php?addon_id=252539&src=external-f1home (the preview URL, natch) needs a referer[sic], right?
Yeah, if you want to test this exact bug you'd want to make the referrer mozillamessaging.com. The easiest thing is probably to use Firebug to add that link to the F1 site and click it.
When I switch the production-install URL on the F1 site with https://addons.allizom.org/services/install.php?addon_id=252539&src=external-f1home, and click on Install, I get a (blank!) 404 page:

https://addons.allizom.org/services/install.php?addon_id=252539&src=external-f1home

GET /services/install.php?addon_id=252539&src=external-f1home HTTP/1.1
Host: addons.allizom.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en,en-us;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://f1.mozillamessaging.com/
Cookie: csrftoken=bf574ade5d21dac66d680308cda04031; amo_home_promo_seen=1

HTTP/1.0 404 Not Found
Server: Apache
X-Backend-Server: pm-app-amo24
Content-Type: text/html; charset=UTF-8
Date: Wed, 17 Nov 2010 18:49:36 GMT
Via: Moz-Cache-pm-zlb-amo01
Connection: Keep-Alive
X-Powered-By: PHP/5.2.9
X-Cache-Info: caching
Content-Length: 0
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 8

9 years ago
try https://addons.allizom.org/services/install.php?addon_id=252539&addon_name=F1&src=external-f1home

you need the name too, apparently
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → FIXED
Verified FIXED -- thanks, Wil.
Status: RESOLVED → VERIFIED
OS: Windows 7 → All
Hardware: x86 → All
James, this is in production now and you can use code similar to this demo to use the install service. Doing it this way will work even with JS disabled or if the user right clicks and saves the button. http://people.mozilla.com/~fligtar/temp/f1.html
(Reporter)

Comment 12

9 years ago
Justin, thank you all very much! I updated our code, and our next release will use the install.php URL.
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.