Closed Bug 1651134 Opened 4 years ago Closed 4 years ago

View Source shows source code of login page instead of current webpage on local django server

Categories

(Core :: Privacy: Anti-Tracking, defect)

80 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox77 --- unaffected
firefox78 --- unaffected
firefox79 - disabled
firefox80 + fixed

People

(Reporter: bullionareboy, Assigned: xeonchen)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Start and run local django server. Login with credentials.
Right click on page and use 'View Source' option

Actual results:

View Source shows the source code of the login page instead of the page where the user clicked.

Expected results:

Show the source code of the current webpage instead of the source code of the login page.

moz-regression found that - Bug 1644111 : Remove isEnabled() check - started this problem.
The good and bad dates are = 2020-06-23 and 2020-06-24

Status: UNCONFIRMED → NEW
Component: Untriaged → JavaScript Engine
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
Regressed by: 1644111

Could be a devtools problem but I'm not sure. Sending to the JS team to have a first look as they introduced the regression.

Assignee: nobody → allstars.chh
Flags: needinfo?(allstars.chh)
Component: JavaScript Engine → JavaScript: GC
Attached file Bug 1651134 - Add isEnabled() check. (obsolete) —

maybeResizeNursery() may update capacity_ so we still need the isEnabled() check.

jonco: Triaging as REO for 79 - can you set a priority and severity for this bug?

Flags: needinfo?(jcoppeard)

(In reply to bull500 from comment #0)

moz-regression found that - Bug 1644111 : Remove isEnabled() check - started this problem.

It's really unlikely that this change could have produced this symptom. Is it possible that another change around the same time could have done this?

I noticed bug 1628486 landed just before this. Could that have caused this?

Flags: needinfo?(jcoppeard) → needinfo?(xeonchen)

(In reply to bull500 from comment #0)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Start and run local django server. Login with credentials.
Right click on page and use 'View Source' option

Actual results:

View Source shows the source code of the login page instead of the page where the user clicked.

Expected results:

Show the source code of the current webpage instead of the source code of the login page.

Can you show me the login url? And upload the screenshot of the expected webpage and actual webpage shown?
Or have you changed any pref?

So I tried https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Admin_site
with the login url 127.0.0.1:8000/admin/
after login, right click to view page source
I got the correct viewsource and cannot reproduce your problem.

Flags: needinfo?(bullionareboy)

(In reply to Yoshi Cheng-Hao Huang [:allstars.chh][:allstarschh] from comment #6)

(In reply to bull500 from comment #0)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Start and run local django server. Login with credentials.
Right click on page and use 'View Source' option

Actual results:

View Source shows the source code of the login page instead of the page where the user clicked.

Expected results:

Show the source code of the current webpage instead of the source code of the login page.

Can you show me the login url? And upload the screenshot of the expected webpage and actual webpage shown?
Or have you changed any pref?

So I tried https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Admin_site
with the login url 127.0.0.1:8000/admin/
after login, right click to view page source
I got the correct viewsource and cannot reproduce your problem.

i've uploaded a Django site project here - https://www.mediafire.com/file/ux1olqftc2xapig/mysite.zip/file

You can use it to test it out
You'll have to do the steps of :
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

once all that is done login via 'sign in' button on the home page - 127.0.0.1:8000

you can check the difference in 'view source' from the following links after sign in:
http://127.0.0.1:8000/list - normal
http://127.0.0.1:8000/create - problem

Flags: needinfo?(bullionareboy)

(In reply to Jon Coppeard (:jonco) from comment #5)

(In reply to bull500 from comment #0)

moz-regression found that - Bug 1644111 : Remove isEnabled() check - started this problem.

It's really unlikely that this change could have produced this symptom. Is it possible that another change around the same time could have done this?

I noticed bug 1628486 landed just before this. Could that have caused this?

Probably not, but it's easy to check.

Could you help to check this?

  1. open about:config
  2. set network.cookie.cookieBehavior from 5 to 4

And see if this affects the result?

Flags: needinfo?(xeonchen) → needinfo?(bullionareboy)

(In reply to Gary Chen [:xeonchen] from comment #8)

(In reply to Jon Coppeard (:jonco) from comment #5)

(In reply to bull500 from comment #0)

moz-regression found that - Bug 1644111 : Remove isEnabled() check - started this problem.

It's really unlikely that this change could have produced this symptom. Is it possible that another change around the same time could have done this?

I noticed bug 1628486 landed just before this. Could that have caused this?

Probably not, but it's easy to check.

Could you help to check this?

  1. open about:config
  2. set network.cookie.cookieBehavior from 5 to 4

And see if this affects the result?

Yes, it did!
It shows the correct source code.

Flags: needinfo?(bullionareboy)

(In reply to bull500 from comment #9)

Yes, it did!
It shows the correct source code.

Thank you! This might be a breakage of dFPI.

Assignee: allstars.chh → nobody
Component: JavaScript: GC → Privacy: Anti-Tracking
No longer regressed by: 1644111
Attachment #9162098 - Attachment is obsolete: true

(In reply to bull500 from comment #7)

you can check the difference in 'view source' from the following links after sign in:
http://127.0.0.1:8000/list - normal
http://127.0.0.1:8000/create - problem

Just tested with the given site and it is reproducible, thank you!

The issue here is because the view-source tab is partitioned by "http://127.0.0.1:8000", and therefore a page required login is not accessible.
It explains why those two pages show different results.

Assignee: nobody → xeonchen
Status: NEW → ASSIGNED
Pushed by xeonchen@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/346a9a9d3b14
do not partition view-source: pages r=baku
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Regressions: 1652243

Thank you for fixing this! :D

Is this ready for a Beta approval request?

Flags: needinfo?(xeonchen)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #16)

Is this ready for a Beta approval request?

This only affects when network.cookie.cookieBehavior=5, and we only show UI to select this value in Nightly channel.
Should we uplift it? Is so, I think it's ready.

Flags: needinfo?(xeonchen)

If this isn't enabled by default on Beta/Release, I think we're fine letting it ride the 80 train. Thanks!

QA Whiteboard: [qa-80b-p2]
Regressions: 1690605
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: