Not doing the X-CLICK-TOKEN dance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
clickmanager-plugin |
Fix Committed
|
High
|
Unassigned | ||
clickmanager-plugin (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Saucy |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
This plugin is passing the oauth signed url to the download manager, and that will fail if the download manager has stuff queued and it takes longer than 5 minutes because the oauth signature expires.
The solution to this are the X-CLICK-TOKEN headers, which are valid for 24 hours, but to get them you need to do a little dance:
1) this plugin will receive an unsigned url to download
2) this plugin will use oauth to sign this url with the users's U1 credentials
3) this plugin will do a HEAD request to the signed url, and retrieve the X-Click-Token header
4) this plugin will pass the *unsigned* url and the X-Click-Token to the download manager
Reference code for the dance can be found here: http://
Related branches
- Manuel de la Peña (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
- Alejandro J. Cura (community): Approve
-
Diff: 373 lines (+90/-22)14 files modifiedsrc/application.cpp (+1/-0)
src/application.h (+3/-0)
src/clickmanager.cpp (+18/-3)
src/clickmanager.h (+3/-0)
src/download/downloader.cpp (+3/-2)
src/download/downloader.h (+1/-1)
src/network/network.cpp (+26/-10)
src/network/network.h (+5/-1)
tests/fakedownloader.cpp (+1/-1)
tests/fakedownloader.h (+1/-1)
tests/fakenetwork.cpp (+6/-0)
tests/fakenetwork.h (+2/-1)
tests/testclickmanager.cpp (+18/-1)
tests/testclickmanager.h (+2/-1)
Fix committed into lp:clickmanager-plugin at revision 16, scheduled for release in clickmanager- plugin, milestone Unknown