invoking bookmarklet with keyword is prevented

Ask for help about NoScript, no registration needed to post
DWizzy

invoking bookmarklet with keyword is prevented

Post by DWizzy »

I do not use a bookmarks toolbar, but keywords to invoke bookmarklets. For instance, I type "d" to open the bookmark for Diigolet.
However in 2.1.0.5, NoScript recognises this as a typed javascript URI in the address bar:
javascript: and data: URIs typed or pasted in the address bar are disabled to prevent social engineering attacks.
Developers can enable them for testing purposes by toggling the "noscript.allowURLBarJS" preference.
Is there a way NoScript could recognise the javascript URI isn't typed but stems from a bookmark, and thus allow execution?
Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User avatar
therube
Ambassador
Posts: 7971
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: invoking bookmarklet with keyword is prevented

Post by therube »

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14
DWizzy

Re: invoking bookmarklet with keyword is prevented

Post by DWizzy »

Ah, didn't see that was actually the same problem. Thanks!

I'll work around it till the solution has been fixed in a main release, I was more keen on reporting this than creating a temporary fix ;)
Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Guest

Re: invoking bookmarklet with keyword is prevented

Post by Guest »

Has this issue resurfaced? allowURLBar -JS and -Imports both true, but NoScript (2.1.2.4rc1) is blocking bookmarklets in Firefox 6+. They'll execute by click, but not keyword. Fresh profile, dev build, etc.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a2) Gecko/20110715 Firefox/7.0a2
User avatar
therube
Ambassador
Posts: 7971
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: invoking bookmarklet with keyword is prevented

Post by therube »

Is this a FF7 issue or are you seeing it on earlier versions too?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110706 Firefox/5.0 SeaMonkey/2.2
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: invoking bookmarklet with keyword is prevented

Post by al_9x »

Confirming, keyword bookmarklet invocation is not working in Fx 6.0b2 with NS 2.1.2.4rc1. allowURLBarJS does not help, nor should it apply to bookmarklet invocation, which should work without additional prefs, as it's been deliberately excepted from the user typed javascript: ban

I suspect (will check) that in order to make this work, loadURIWithFlags will need to be patched (instead of loadURI), as suggested here.
Last edited by al_9x on Sat Jul 16, 2011 3:16 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: invoking bookmarklet with keyword is prevented

Post by al_9x »

al_9x wrote:I suspect (will check) that in order to make this work, loadURIWithFlags will need to be patched (instead of loadURI)
Indeed, loadURIWithFlags is called in 6.0+, loadURI in 5.0.
Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: invoking bookmarklet with keyword is prevented

Post by Giorgio Maone »

Fixed in latest development build 2.1.2.4rc2.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: invoking bookmarklet with keyword is prevented

Post by al_9x »

verified
Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: invoking bookmarklet with keyword is prevented

Post by al_9x »

The Fx built-in equivalent of the SmartSearch new tab problem is alt-enter on the keyword, which runs the bookmarklet in a new tab and is also currently failing.
Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
User avatar
therube
Ambassador
Posts: 7971
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: invoking bookmarklet with keyword is prevented

Post by therube »

(Note that in SeaMonkey, Ctrl+Enter opens the current URL in a new tab, as it should be :lol:. OK, I see, Alt+Enter in FF is the equivalent of Ctrl+Enter in SeaMonkey. Never knew FF had that function. Atl+Enter is a tough combo to hit.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110706 Firefox/5.0 SeaMonkey/2.2
zozo
Posts: 1
Joined: Tue Oct 04, 2011 10:39 am

Re: invoking bookmarklet with keyword is prevented

Post by zozo »

This problem still exists with Firefox 7.

I've tried the development build (2.1.4rc2 )but isn't it even older than the release version (2.1.4)?
Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
stvltvs

Re: invoking bookmarklet with keyword is prevented

Post by stvltvs »

Still a problem in FF 8, NoScript 2.2.3.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Guest

Re: invoking bookmarklet with keyword is prevented

Post by Guest »

I'm using FF 10.0.2 and NoScript 2.3.1, and still have this issue.
I have allowURLBarJS, allowURLBarImports, allowBookmarkletImports, and allowBookmarks all true (not sure how many of these are relevant, I just checked for any settings that looked applicable).

Is there a NoScript setting that allows this to work?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: invoking bookmarklet with keyword is prevented

Post by Giorgio Maone »

It works for me with default settings.
What I tried:
  • Created a clean profile
  • Created a bookmark with URL javascript:alert(1) and keyword al
  • Typed "al" in the address bar and hit [Enter]: an alert window with content "1" appeared (keyworded bookmarklet working)
  • Installed NoScript and restarted Firefox
  • Typed "al" in the address bar and hit [Enter]: an alert window with content "1" appeared (keyworded bookmarklet still working)
    [/quote]
    What am I missing?
    Does your bookmarklet work if invoked by other means (e.g. by clicking it)?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Post Reply