Opened 8 years ago

Closed 8 years ago

#4722 closed defect (fixed)

Rearranging tabs broken with Torbutton 1.4.5 on Windows

Reported by: cypherpunks Owned by: mikeperry
Priority: High Milestone:
Component: TorBrowserButton Version:
Severity: Keywords: MikePerryIterationFires20111225
Cc: aagbsn Actual Points: 1
Parent ID: Points: 1
Reviewer: Sponsor:

Description

The tabs within Tor Browser can't be rearranged with Torbutton 1.4.5. While disabling external drag-and-drop is good (it prevents accidents where a sensitive Tor Browser tab is dropped and loaded in a non-Tor browser due to a mouse-slip), it should work internally.

Steps to reproduce:

  1. Open n>1 tabs.
  2. Drag one of the tabs, drop at another position. The tab won't budge.

Used software:
Tor Browser Bundle 2.2.34-3
HTTPS-Everywhere 1.2.1
NoScript 2.2.3
Torbutton 1.4.5

Child Tickets

Attachments (1)

torbutton-1.4.5+4722.xpi (819.4 KB) - added by mikeperry 8 years ago.
Fix for Windows DnD issue. Needs testing against Ubuntu Unity for regressions.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 8 years ago by mikeperry

Status: newneeds_information

What OS are you on? Dragging tabs around works fine for me...

comment:2 Changed 8 years ago by cypherpunks

Windows 7 64-bit, Service Pack 1 (Aero/DWM enabled).

comment:3 Changed 8 years ago by mikeperry

Hrmm. We've got another Windows 7 user who claims they are able to drag and drop tabs just fine.. There may be something else at work here...

comment:4 Changed 8 years ago by mikeperry

Doh. Cancel that. The user was not yet using Torbutton 1.4.5.

comment:5 Changed 8 years ago by mikeperry

Summary: Rearranging tabs broken with Torbutton 1.4.5Rearranging tabs broken with Torbutton 1.4.5 on Windows

In other news, I tested Mac OS with 1.4.5 and it works fine. This is specific to Windows. Possibly just Windows 7?

comment:6 Changed 8 years ago by cypherpunks

I can't move tabs with Aero off and in Windows XP (in a VM) either. Works fine with Torbutton 1.4.4.1.

comment:7 Changed 8 years ago by mikeperry

Priority: normalmajor
Status: needs_informationassigned

This is probably a major issue (I know it annoyed the shit out of me on Linux until I fixed it there in 1.4.5), but the Windows side likely won't get fixed until early next year as I lack Windows installations, Ubuntu Installations, and time. :/

The problem lies in the invokeDragSessionWithImage override in components/external-app-blocker.js (see https://gitweb.torproject.org/torbutton.git/blob/master:/src/components/external-app-blocker.js#l227).

Most likely, one of the "flavors" we block there is probably needed by Firefox for internal DnD on Windows. So long as it is not a flavor that Ubuntu sniffs (#4517), we can allow it.

The other possibility is that we shouldn't set aActionType = 0 at the top of the function. It could be disabling internal drag-n-drops. Maybe the Firefox Windows code listens to it but we do not.

The good news is that if you know even the slightest bit about how to unzip a file, edit a file, rezip and install it using a file:// url, it should be a pretty easy thing to try out these possibilities without much other than guess-and-check.

comment:8 in reply to:  7 Changed 8 years ago by mikeperry

Replying to mikeperry:

The good news is that if you know even the slightest bit about how to unzip a file, edit a file, rezip and install it using a file:// url, it should be a pretty easy thing to try out these possibilities without much other than guess-and-check.

I meant unzip the xpi, edit the components/external-app-blocker.js file to try removing some flavor lines and/or the aActionType, and install it by typing file:// in Firefox and navigating to the xpi location.

You can get a direct download to Torbutton 1.4.5 xpi here: https://www.torproject.org/dist/torbutton/torbutton-1.4.5.xpi.

comment:9 Changed 8 years ago by cypherpunks

Replacing (flavor == "text/x-moz-url"
flavor == "text/x-moz-url-data" flavor == "text/uri-list" flavor == "application/x-moz-file-promise-url") with (0) makes no difference. Just removing aActionType = 0; fixes the problem, although I saw the following error in the Error console:

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDragService.invokeDragSessionWithImage]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: jar:file:///[...]/components/external-app-blocker.js :: <TOP_LEVEL> :: line 251" data: no]
Source File: jar:file:///[...]/components/external-app-blocker.js
Line: 251

Where line 251 is:

return this._drag().invokeDragSessionWithImage(aDOMNode, aTransferableArray, aRegion, aActionType, aImage, aImageX, aImageY, aDragEvent, aDataTransfer);

I saw this error only once and couldn't reproduce it anymore.

comment:10 Changed 8 years ago by mikeperry

Cc: aagbsn added

Wow, thanks a ton cypherpunks. You probably saved me several hours of dealing with Windows. Now we just need to find an Ubuntu user to make sure this doesn't re-enable the proxy bypass from #4517.

As for the exception, that looks like an actual exception thrown by the Firefox version of invokeDragSessionWithImage.. The correct behavior for us is to let that exception get thrown up to the calling frame, but unfortunately that has the side effect of getting it logged in the Error Console along the way (because it passed through an extension component). It is likely not serious.

I will attach a fresh xpi to this ticket with the aActionType = 0 line removed and try to find an Ubuntu Unity user to test it for regressions.

Thanks again!

Changed 8 years ago by mikeperry

Attachment: torbutton-1.4.5+4722.xpi added

Fix for Windows DnD issue. Needs testing against Ubuntu Unity for regressions.

comment:11 Changed 8 years ago by mikeperry

We've got two reports so far that the attached XPI still prevents proxy bypass on Ubuntu Unity. I think we've got a fix here.

comment:12 Changed 8 years ago by mikeperry

Actual Points: 1
Keywords: MikePerryIterationFires20111225 added
Points: 1
Resolution: fixed
Status: assignedclosed

Ok, marking this as fixed. I went ahead and pushed a Torbutton 1.4.5.1 with the fix to the website, as well.

Note: See TracTickets for help on using tickets.