Opened 11 years ago

Closed 10 years ago

#4124 closed Enhancement (invalid)

Added Cookie Input Box to WebUI

Reported by: bulljit Owned by:
Priority: Normal Milestone: None Set
Component: Web Client Version: 2.22
Severity: Normal Keywords:
Cc:

Description

Added a input box for the "cookies" argument (r12168) to the add torrent dialog. See attached.

Attachments (1)

cookie_web.diff (2.5 KB) - added by bulljit 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by bulljit

comment:1 Changed 11 years ago by jordan

Very cool!

But, wouldn't this mean a user would have to go to their cookies window and copy->paste the cookie string into this? Is it possible for the web client to just grab that cookie on its own without manual intervention, or does that violate some browser security model?

comment:2 Changed 11 years ago by bulljit

The easiest way to get the cookie is a bookmarklet:

javascript:alert(document.cookie);

The problem is javascript is only allowed to access the current page's cookies and is also limited by rules of Cross-Domain-Scripting. So you can't automatically pass info from one site to a different site.

So in order to pass a cookie to the WebGUI it would require user intervention at some point in time:

  1. manually pasting it into the input box
  2. saving it to the cookies.txt

The only way to access a browser's cookies database would be a separate program that would mine the data, or through a browser specific add-on/extension (NOT through javascript; could you imagine the implications of a webpage having access to my entire cookie database?)

Adding the input box atleast allows a user to download torrents with a cookie that is either absent or newer than that in the cookies.txt file.

But honestly i did it just out of curiosity :)

comment:3 Changed 11 years ago by jordan

Yes, I definitely understand the security concerns there. What I didn't know, was whether or not there was a way to get a popup asking the user if it's okay or not. Browsers probably wouldn't allow that either, since it would generate a flood of popups from bad sites.

I'm not sure what to do with this ticket. Given the browser's security model this patch is probably as close as we're going to get to the "real" feature inside of Transmission's web client, but it's so awkward that I wonder how many people would actually use it.

Even though I appreciate the patch -- and, actually, want to strongly encourage people who patch the web client, since it's between maintainers ATM ;) -- it might be better to pass on this ticket.

comment:4 Changed 11 years ago by bulljit

No problem, I use my own bookmarklet to get the WebUI to download what I want in 2 clicks. (No ugly copy-paste).

I guess the more appropriate argument is in the mobile setting (the sexy thing right now), there is NO way to download a private torrent that's not awkward (except for https://github.com/bulljit/Transmission-Add-Torrent-Bookmarkelet).

In the Smartphone Age:

  • Will the mobile browser allow you to download a torrent file to your phone?
  • If you could download it, how do you allow the WebUI to open it?
  • Apple is unlikely to approve a Transmission.Iphone.App

This solution at least gives the possibility to do so. I wonder how many people currently copy-paste the public URL to the web client anyways :D

It's been awhile since I've been on a Windows PC, but what utorrent used to do is allow you to append the cookie to the url.

i.e. www.site.com/new.torrent?COOKIE:blah_key=blahvalue; that would at least be only one paste. it would then parse for the cookie string.

I will continue to brainstorm a better way to interact with Transmission via the iPhone, as this would definitely favor it over other bittorrent clients. (No worries its already my favorite!)

Another thought, maybe we store the cookie into cookies.txt when it's pasted the first time, and then the user no longer needs to paste it for future files from the same site... hmm...

comment:5 Changed 10 years ago by jordan

  • Resolution set to invalid
  • Status changed from new to closed

There doesn't seem to be much more demand for this, so I'm going to close this ticket.

Note: See TracTickets for help on using tickets.