javascript: protocol URLs typed into the address bar no longer work
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
People
(Reporter: jkt, Unassigned)
References
Details
(Whiteboard: [sng])
Attachments
(1 file)
Reporter | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
we have one new case in bug 1552141, where a bookmark keyword points to a bookmarklet, and because of this bug it wouldn't work (modulo the fact we currently wrongly filter out that result).
This needs a decision, to either take the devtools path (a single pref to control the js in urlbar behavior) or we decide that we don't support the case, and then bug 1552141 becomes a wontfix, in the sense we won't support keywords replacement in bookmarklets.
Comment 11•6 years ago
|
||
Not sure who makes the call here, what does product think?
Updated•5 years ago
|
Comment 12•5 years ago
|
||
I think I'd be fine with not having javascript: support in the address bar, not even via a special devtools pref — there are very few use cases not solved by bookmarklets or the console.
Looping in Mike, Harald and Martin for their take.
Comment 13•5 years ago
|
||
I am also not aware of any use cases. If users want to execute snippets, Console works just fine and now even better with the multiline editor mode. Given how little feedback that thread has gotten from outside, it seems save to remove.
Comment 14•5 years ago
|
||
No objections here and I'm not aware of more use cases than already mentioned. So, as long as bookmarklets work I think we're good to remove it.
Comment 16•5 years ago
|
||
Sounds like there's consensus to remove this feature ie to keep this broken.
Is there anything left to do here? Perhaps there's code that can be removed, like the code that strips the javascript: protocol from pastes? Or other JS-specific urlbar code? Perhaps we want to show an error page instead of doing nothing (which is the current behaviour) ?
Comment 17•5 years ago
|
||
I would vote for an error page and ideally an automated test.
Reporter | ||
Comment 18•5 years ago
|
||
Reporter | ||
Comment 19•5 years ago
|
||
So the attached patch prevents and user initiated UI loading of a javascript: url and loads an error page. This prevents mayInheritPrincipal=false && isSystemPrincipal
and nothing else. So a content page can still load javascript urls and also bookmarks who inherit principals can load javascript.
Comment 20•5 years ago
|
||
Removal of this feature is totally unapropriate.
It blocks certain kind of browser automation that is used quite a lot in certain circles. For example, in Autohotkey scripts this is often used method to influence pages displayed externally without any programming ceremony, by simply CTRL + L + Send(keys).
Furthermore, what is the point of browser.urlbar.filter.javascript
option ?
You can do this in all other browsers, and this defect alone made me return to Chrome for certain work until it gets fixed.
So please, you didn't thought this trough, fix the issue, it is already disabled by default, whats the harm ?
Comment 21•5 years ago
|
||
(In reply to majkinetor from comment #20)
It blocks certain kind of browser automation that is used quite a lot in certain circles. For example, in Autohotkey scripts this is often used method to influence pages displayed externally without any programming ceremony, by simply CTRL + L + Send(keys).
You could do exactly the same thing by using the console shortcut (ctrl-shift-k) and then whatever you were posting in the URL bar, without the javascript:
bit (you can close it again with ctrl-shift-i). Is there some reason that doesn't work?
Also, when you say "circles", what "circles" are these? Is there a vibrant community of people who write autohotkey scripts that then manipulate in-browser documents that you can link us to?
Furthermore, what is the point of
browser.urlbar.filter.javascript
option ?
Whether or not bookmarklets / history entries for javascript: URIs show up in the autocomplete results; this preference doesn't govern what happens if you try to navigate to javascript: URIs yourself.
You can do this in all other browsers, and this defect alone made me return to Chrome for certain work until it gets fixed.
We first (accidentally) broke this in a copy of Firefox released 11 months ago (Fx63, released october 2018), but as far as I know nobody reported it broken until now (except, in this report, the developer who broke it). What changed?
It is already disabled by default, whats the harm ?
It's not "already disabled" (which implies there's some pref to turn it on/off), it's broken, and it's been broken in shipping release versions of Firefox for nearly a year, as far as I know without any complaints before yours just now. So rather than leaving it in a broken state we're adding an error page to say "you can't do this", and tests so that we notice if anything about this behaviour changes by accident in the future.
Comment 22•5 years ago
|
||
You could do exactly the same thing by using the console shortcut (ctrl-shift-k) and then whatever you were posting in the URL bar
Not exactly the same thing. Using URL bar is almost invisible, while opening and closing console between any action is totally unapropriate.
Also, when you say "circles", what "circles" are these? Is there a vibrant community of people who write autohotkey scripts that then manipulate in-browser documents that you can link us to?
When I say circles I mean its a common technique. For example, few quick finds:
- https://www.autohotkey.com/boards/viewtopic.php?f=76&t=67687&p=290936#p290936
- https://autohotkey.com/board/topic/874-using-javascript-in-ahk-script-to-control-web-pages
- https://stackoverflow.com/questions/45846797/how-can-i-execute-javascript-methods-with-autohotkey
Whether or not bookmarklets / history entries for javascript: URIs show up in the autocomplete results; this preference doesn't govern what happens if you try to navigate to javascript: URIs yourself.
OK, thanks, it seems that bunch of people on the Internet are mistaking this one for another thing.
Nobody reported it broken until now
Given the global usage of Firefox and specific niche this falls into, I am not really surprised. In my case, I noticed this first day it occured. I was trying intermitiently to make it work thinking that this is some config issue. Then I switched to Chrome. Now I am using FIrefox again, and thought to check it out again and do a bit more investigation as I want to stay on Firefox. I am sure not many people find this thing show stopping .
So rather than leaving it in a broken state we're adding an error page to say "you can't do this", and tests so that we notice if anything about this behaviour changes by accident in the future.
You are still leaving it broken, you just made a ceremony around it and promoted it into a 'feature'. I am confused why this isn't actually made into advanced feature if you are concerend about security.
Comment 23•5 years ago
|
||
I'd like to take a quick moment and add my voice to majkinetor's. I use javascript: from the address bar thousands of times a day in my business, usually in conjunction with AutoHotKey. I was about to complain when this first broke, but then I discovered ESR, and was happily running that until the most recent update.
The console is slower and requires a focus change to deal with the separate window, or change how the window is parsed when accessing in-browser objects directly through COM + MS's Accesibility.
I would humbly request that this be fixed, and if security is a concern, disable it by default but give users the ability to enable it
Comment 24•4 years ago
|
||
Any ETA on fixing this bug?
Comment 25•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:adw, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Description
•