"warn me when web sites try to redirect" option does not work on redirections done via Javascript (e.g. on Google Docs)

NEW
Unassigned

Status

()

Core
General
--
enhancement
6 years ago
2 years ago

People

(Reporter: u416532, Unassigned)

Tracking

(Depends on: 2 bugs, Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(platform-rel -)

Details

(Whiteboard: [platform-rel-Google][platform-rel-GoogleDocs], URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Build ID: 20110902133214

Steps to reproduce:

enabled the option to warn when a site tries to reload or redirect.
signed into google docs.


Actual results:

a page saying something about me being redirected was shown.  a bar at the top warned me that the site was trying to redirect me.  However this was only shown for a short amount of time (less than half a second) before I was redirected to the google docs page.


Expected results:

it should have waited for me to click "allow" before redirecting me.
Note: this is reproducible.  I have also noted that it is redirecting me anyway on other sites.

Updated

6 years ago
Summary: warn me when a site tries to redirect option does not work. → warn me when a site tries to redirect option does not work on Google Docs

Updated

6 years ago
Blocks: 685496
(Reporter)

Comment 1

6 years ago
I have now discovered that this is true for all sites not just google docs.

Comment 2

6 years ago
Can you provide any such URL? And have you tried in Firefox Safe mode ( http://support.mozilla.com/en-US/kb/Safe%20Mode ) ?
(Reporter)

Comment 3

6 years ago
I just tried in safe mode and it does not make any difference.  I think my example of logging into google docs ( https://accounts.google.com/ServiceLogin?service=writely&passive=1209600&continue=http://docs.google.com/&followup=http://docs.google.com/&ltmpl=homepage )is as good as any.

Comment 4

6 years ago
An example without the necessity of registration would be better. I do not get any redirection warning on the provided URL.
(Reporter)

Comment 5

6 years ago
Yes I see that an example without registration would be better.  The thing is that now that I am looking for an example without registration I cannot find any such sites that have auto redirect. I suppose I will come across one some time though.
Sorry.
(Reporter)

Comment 7

6 years ago
That only shows the firefox has prevented this page from reloading.  That works fine.  Its only with the ones that try to redirect that there is a problem.

Comment 8

6 years ago
How do you define the difference between reload (refresh) and redirect. I think this feature (infobar) does not really distinguish them (that is bug 453077).
Do you mean the via the <meta refresh> tag or via HTTP 302 response?
(Reporter)

Comment 9

6 years ago
The feature does distinguish between them.  a site such as http://weather.uwaterloo.ca/ comes up with a bar at the top that says: firefox prevented this page from reloading.(and that does work) on a site that redirects there is at the top it says: firefox prevented this page from redirecting you to a different pages.  The problem is it only show that at the top for less than half a second and then redirects me anyway.

Comment 10

6 years ago
Created attachment 561214 [details]
testcase with real redirection

Comment 11

6 years ago
OK, you are right. The text is different, but nothing else. 
On the weather page the bar appears and says "prevented reloading" (but it should not really appear before 900 seconds have ellapsed, that is bug 417770).

On the attached testcase it says "prevented redirecting to another website". The bar stays there until I answer. What do you see?
(Reporter)

Comment 12

6 years ago
Okay.  So that actually does work.  However I am sure that when I log into any google service after logging out the bar at the top does come up and then disappear without my doing anything.  Are there different types of redirect or something?
(Reporter)

Comment 13

6 years ago
Okay.  So here is an example where you do not have to log in.
type http://www.barnesandnoble.co/ into the address bar and press enter.
When I do this for less than a second there is a white page with the firefox has prevented this page from redirecting bar at the top.  This is then replaced (without me clicking allow) with a website.  There is to possibilities  here: either the page is redirecting me and firefox is not stopping it or firefox is claiming that the page is redirecting me when it is not.  Either way SOMETHING is wrong.

Comment 14

6 years ago
Yes, I see this it on that page. It seems caused by the fact, that there is a meta refresh, but also the url is changed via javascript. You can see it when you disable javascript in Tools -> Options -> Content . If you do that, the infobar will stay there until you answer.
(Reporter)

Comment 15

6 years ago
Yes that's true but disabling java script does not really sound like the best solution.

Comment 16

6 years ago
Understand. Can you confirm there is also Javascript redirection (window.href=, document.location=, etc.) on the Google docs page?
(Reporter)

Comment 17

6 years ago
Yes.  Disabling java script fixes that.(although google docs does not work at without javascript)

Comment 18

6 years ago
OK. The feature of warning about redirects is only designed to warn about them when they are specified via the <meta http-equiv="refresh"> tag. There is no attempt to warn/block Javascript or HTTP 302 redirects.

I will convert this report to an enhancement request for such feature. I am sure many people wish that it also blocked javascript. But I couldn't find any older report for it.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: warn me when a site tries to redirect option does not work on Google Docs → "warn me when web sites try to redirect" option does not work on redirections done via Javascript (e.g. on Google Docs)
Version: 6 Branch → Trunk
Component: General → General
Product: Firefox → Core
QA Contact: general → general
You can't tell when a location set is a "redirect" vs a page navigation, really.  You can guess, but the guess will be wrong sometimes.

Comment 20

6 years ago
Yes, then Firefox will ask for all location sets (but maybe it could see if the domain is changing). When people want these infobars they will need to cope with the frequency of them. But with bugs like bug 685550, bug 453077, bug 423749 fixed, it could be quite usable.
I think the goal of this bug is to call nsIWebProgressListener2::onRefreshAttempted(...) when JavaScript

  window.location.replace("http://www.example.com/");

etc. is executed.

Maybe this is a silly question, but is it allowed to push/pop a location.replace(...) request in a pool somewhere? i.e. This redirect can be asynchronous?
Duplicate of this bug: 767732
Depends on: 803590

Comment 23

5 years ago
Hello there,

My friend and I are interested in helping out.  Is this bug still active?  If so, where/how do we begin?

Thanks.

Updated

4 years ago
Depends on: 801748

Comment 24

4 years ago
see also Bug 951685
Duplicate of this bug: 1106712
Duplicate of this bug: 1117472
Whiteboard: [platform-rel-Google]
Whiteboard: [platform-rel-Google] → [platform-rel-Google][platform-rel-GoogleDocs]

Updated

2 years ago
platform-rel: --- → ?
Are we going to do anything here?
platform-rel: ? → -
You need to log in before you can comment on or make changes to this bug.