Revoke Temporary Permissions On Tab Close

Bug reports and enhancement requests
Post Reply
Nuttysman
Posts: 6
Joined: Wed Mar 06, 2013 2:57 am

Revoke Temporary Permissions On Tab Close

Post by Nuttysman »

I've been through the FAQs and the rules and did a search as much as I could but didn't find an answer to my question. Hopefully it hasn't been asked and answered already.

Is it possible to have an option to revoke a site's temporary permissions upon closing the page or tab that's open with that site showing?

Currently, the only way I know to do it is to revoke the permissions, then close the tab. This would be useful for sites such as HuffingtonPost when you have multiple tabs of it open.

Thanks. :)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Tom T.
Field Marshal
Posts: 3620
Joined: Fri Mar 20, 2009 6:58 am

Re: Revoke Temporary Permissions On Tab Close

Post by Tom T. »

Revoke temporary permissions for SiteX.com does revoke it for all tabs of SiteX.com, regardless of whether you close the tabs.

If you are asking for NoScript to automatically revoke the permissions when you close the tab, or the last open tab of SiteX, which if I understand correctly is your request, then that has been proposed, and shot down.

(I searched with these keywords in the box: revoke temporary tabs to find that older thread).
Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20100101 Firefox/19.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Revoke Temporary Permissions On Tab Close

Post by Thrawn »

Out of curiosity, why is it that you want this? Perhaps what you really want is allowing JavaScript from site A only when you visit site B, not elsewhere?

If you really want tab-specific permissions, you can have a shot at something like this using the Tab Permissions and Host Permissions addons. They're a bit quirky, not as straightforward or user-friendly as NoScript, but they can do it.

What you would do is install both addons, then configure Host Permissions to permanently block JavaScript on the target domain, but configure NoScript to allow it (permanently or temporarily). You can then right-click on a tab and use Tab Permissions to allow JavaScript only on that tab.

As I said, these two addons are quirky, so take care and use at your own risk. In particular, please note:
  • Host Permissions only makes decisions based on the first site opened in each tab. If you browse, in the same tab, from a site that it trusts to a site that it doesn't, or vice versa, then the permissions for that tab don't change. Similarly, once Tab Permissions trusts a tab, it will continue to trust it regardless of where you browse (but NoScript should help out here). If you always open sites in new tabs, this probably won't affect you, but if you reuse tabs, then be careful.
  • There is some interaction, which I don't fully understand (but almost certainly related to CAPS policies), between these addons and NoScript. For example, if a site is blocked in NoScript, then it will show up in Tab Permissions as having JavaScript blocked. This might not be a problem - it hasn't affected me to date - but I don't know enough about it to be sure. Unfortunately, CAPS was not designed to let multiple addons cooperate...
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0
Nuttysman
Posts: 6
Joined: Wed Mar 06, 2013 2:57 am

Re: Revoke Temporary Permissions On Tab Close

Post by Nuttysman »

@ Tom T. - thanks for the response and info. Don't know why it didn't occur to me to search for the phrase instead on just one word. * smacks forehead *

@ Thrawn - thanks for the info as well but that's really not what I want. And I prefer not to use 'quirky' addons. An example of why I wanted to do this is:

I may have, say, 3 or more tabs to different articles open from the Huffingpost (which uses a ton of javascripts) and will need to allow different scripts to temporarily run on each tab, depending on what content is there I want to see. Allowing a script one tab reloads all the tabs (which is expected) but when I close the tab I've read and am ready to read the next one, it would have been nice to have the tempory permissions automatically revoked as each article may or may not need the same or different scripts allowed. I don't allow scripts globally, even temporarily.

It's not a big deal, just that the way it is now I have to allow certain scripts, read the article, revoke the permissions, close the tab and do the same thing all over again on the next one. It would be no problem at all if all the tabs from them needed the same scripts to run but that is rarely, if ever, the case.

And the Huffingtonpost is just an example. I run into this same scenario at many, many sites.

But like I said, no big deal since it's not a simple thing to incorporate into NoScript. :)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Revoke Temporary Permissions On Tab Close

Post by Thrawn »

Nuttysman wrote: I may have, say, 3 or more tabs to different articles open from the Huffingpost (which uses a ton of javascripts) and will need to allow different scripts to temporarily run on each tab, depending on what content is there I want to see. Allowing a script one tab reloads all the tabs (which is expected) but when I close the tab I've read and am ready to read the next one, it would have been nice to have the tempory permissions automatically revoked as each article may or may not need the same or different scripts allowed. I don't allow scripts globally, even temporarily.
Well, if you're going to use only temporary permissions at a site you regularly visit, then you're going to have a lot of manual work on your hands...

Since you're still giving these scripts a chance to run, obviously you don't think that they're going to attack you. If you're going to be whitelisting them regularly, are you sure you don't want to permanently allow them? I don't object to being paranoid, but you're really not doing much by revoking permissions after the fact. I use temporary permissions when I'm experimenting to see which scripts a site needs to run, and/or when I don't know whether I'll ever be back. If I'm using a site regularly, I'll permanently allow things.

Of course, using RequestPolicy also helps...I can allow a site's scripts, but know that it will only run in selected places.

By the way, that 'reload all tabs' behavior is configurable.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0
Nuttysman
Posts: 6
Joined: Wed Mar 06, 2013 2:57 am

Re: Revoke Temporary Permissions On Tab Close

Post by Nuttysman »

Hmmm ... you make some very valid points and I will give them some thought. I guess it really doesn't make sense to revoke permissions that I know I'll need again later. And your point about using temporary permissions to experiment is also a good one.

Thanks for the insights. :D
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Post Reply