Open Bug 1558012 Opened 5 years ago Updated 1 year ago

Loading a saved website from HTML document reliably crashes Firefox Dev 68.0b8

Categories

(Core :: DOM: Serializers, defect, P3)

68 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: nkeb3, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Saved a website to HTML

Actual results:

Loading the saved HTML crashes firefox every single time

Expected results:

It must load the saved HTML file without crashing

It only works if the file is loaded from harddisk like:
file:///C:/filename.html

When you click the file above it doesn't crash. For testing you must "right click" and "save as", then open it from disk.

It is a google search. But I'm no web dev, so I cannot tell if JS or CSS or another site element causes the crash and why it only occurs when the HTML resource is loaded from disc and not from web.

<script nonce="LNxVc8iWW785DjI600sdxQ==">(function(){var urgencyLevel=2;var wcdt=-1;(function(){var c=(this||self).JSON.parse;var f=function(a){try{var b=window.localStorage.getItem("cns;;"+a);if(b){var d=b.indexOf("_");var e=0>d?null:c(b.substr(d+1))}else e=null;return e}catch(l){}return null};try{var g=(parseInt(f("u"),10)||0)
<urgencyLevel;if(0
<wcdt){var h=parseInt(f("d"),10)||0;g=google.time()-h>wcdt}if(null==document.cookie.match("(^|;)\\s*CONSENT=YES\\+")&&g){var k=document.querySelector("#cnso");k&&(k.style.display="block",k.removeAttribute("aria-hidden"))}}catch(a){google.ml(a,!0,{src:"cnso"})};}).call(this);})();
</script>


This kills my firefox if loaded from a html file on e.g. desktop or any other disk loaction.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

If you need to contact me about this, ask this new account, sorry I had to use a spam mailer since I don't like handing out my real e-mail unless there is a good reason. And I crashed during testing, so I don't have access to the account reporting the issue first.

A new Observation: I renamed the file for testing today. It suddenly did not crash anymore. The crash only happens if two conditions are satisfied.

Filename is:

'secp256k1' 'brainpool512r1' 'secp256r1' 'openssl' - Google-Suche.html

Must contain:

<script nonce="LNxVc8iWW785DjI600sdxQ==">(function(){var urgencyLevel=2;var wcdt=-1;(function(){var c=(this||self).JSON.parse;var f=function(a){try{var b=window.localStorage.getItem("cns;;"+a);if(b){var d=b.indexOf("_");var e=0>d?null:c(b.substr(d+1))}else e=null;return e}catch(l){}return null};try{var g=(parseInt(f("u"),10)||0)
<urgencyLevel;if(0
<wcdt){var h=parseInt(f("d"),10)||0;g=google.time()-h>wcdt}if(null==document.cookie.match("(^|;)\\s*CONSENT=YES\\+")&&g){var k=document.querySelector("#cnso");k&&(k.style.display="block",k.removeAttribute("aria-hidden"))}}catch(a){google.ml(a,!0,{src:"cnso"})};}).call(this);})();
</script>

I hope this helps. I have no idea why a single script and a filename together only can cause it.

(In reply to nkeb3 from comment #4)

A new Observation: I renamed the file for testing today. It suddenly did not crash anymore.

That's interesting to know.
Henri or Mirko may be able to explain.

The crash only happens if two conditions are satisfied.

Filename is:

'secp256k1' 'brainpool512r1' 'secp256r1' 'openssl' - Google-Suche.html

Must contain:

<script nonce="LNxVc8iWW785DjI600sdxQ==">(function(){var urgencyLevel=2;var wcdt=-1;(function(){var c=(this||self).JSON.parse;var f=function(a){try{var b=window.localStorage.getItem("cns;;"+a);if(b){var d=b.indexOf("_");var e=0>d?null:c(b.substr(d+1))}else e=null;return e}catch(l){}return null};try{var g=(parseInt(f("u"),10)||0)
<urgencyLevel;if(0
<wcdt){var h=parseInt(f("d"),10)||0;g=google.time()-h>wcdt}if(null==document.cookie.match("(^|;)\\s*CONSENT=YES\\+")&&g){var k=document.querySelector("#cnso");k&&(k.style.display="block",k.removeAttribute("aria-hidden"))}}catch(a){google.ml(a,!0,{src:"cnso"})};}).call(this);})();
</script>

I hope this helps. I have no idea why a single script and a filename together only can cause it.

Component: DOM: Core & HTML → Serializers
Priority: -- → P3
Flags: needinfo?(mbrodesser)
Flags: needinfo?(hsivonen)

The file name being part of the problem suggests it has something to do with single quotes in the file name. However, I was unable to reproduce the problem in a Windows 10 virtual machine.

(It appears that the file causes network connections even when loaded from the local disk.)

Flags: needinfo?(hsivonen)

I've tried to reproduce this with Firefox 69.0a1 on Windows 10 (not within a VM). The first time I opened the attachment in a new tab, the computer froze. However, it might have been a coincidence, and it's not the scenario described in this issue.
After rebooting that problem didn't reoccur. I attempted to reproduce the originally reported issue multiple times, but it never crashed.

@nkeb3: can you please try to reproduce the issue with current nightly? I can't request information via BugZilla from your newly created accounts, because all of them are disabled.

Flags: needinfo?(mbrodesser)
Severity: normal → S3

Hello,
Trosclairson Jeffry here,
I am also facing this problen (Loading a saved website from HTML document reliably crashes Firefox Dev 68.0b8) on site(https://medidordevelocidadtelmex.online/). If you get this solution of this mention me.
Thanks.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: