RFE: enable cookies for data sources
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Variety |
New
|
Wishlist
|
Unassigned |
Bug Description
From PheniX:
Some data sources allow a wider selection of wallpapers if the user is logged in.
I have tried a very fast hack to add cookies at URL fetch by adding to the Util.urllib function something like:
if url.find(
cookies = "name0=value0;" # put here the session cookies that identify an open session/logon
cookies += "name1=value1;"
just before the line
return urllib2.
This works enough for me, but a better way could be:
- the user saves the datasource cookies with a browser to a text file after logon (plenty of addons help doing it),
- enabling cookie handling in variety with cookielib by reading from the saved cookie file
Or even better:
- enable cookie handling with cookielib
- add a Logon dialog for the specific datasource to do logon straight from variety
Changed in variety: | |
importance: | Undecided → Wishlist |
description: | updated |
@PheniX:
I would rather NOT have the logon dialog in Variety - asking people to provide credentials for external services within an application like Variety teaches everyone bad security practices. There is OAuth for this exact reason and it should be used when available. I had something like this for Facebook sharing, but in an embedded Webkit, still passing via OAuth, and I'm glad I got rid of it and use OAuth properly in the browser now for FB.
Flickr supports OAuth, but I'm not sure the user gets much benefit from being logged in to Flickr, the effort to implement OAuth there just doesn't seem worth it.
For Wallhaven OAuth is not an option.
I guess what we can have is to add support for a folder ~/.config/ variety/ login-cookies where users will be able to put cookie text files and Variety will use them, like in the first solution you mention, then we document this on the website and in Tips-and-tricks. This means only more advanced and interested users will be able to use it.
PheniX, would like to provide a patch for this?