From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out.smtp-auth.no-ip.com (out.smtp-auth.no-ip.com [8.23.224.60]) by hurricane.the-brannons.com (Postfix) with ESMTPS id D924F79DCD for ; Thu, 29 Dec 2016 17:30:00 -0800 (PST) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.52.200.227]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 2A93645D for ; Thu, 29 Dec 2016 17:30:02 -0800 (PST) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id uBU1U1bO008872 for ; Thu, 29 Dec 2016 17:30:01 -0800 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id uBU1U0LK008869 for ; Thu, 29 Dec 2016 17:30:00 -0800 Date: Thu, 29 Dec 2016 17:30:00 -0800 (PST) From: Kevin Carhart To: Edbrowse-dev@lists.the-brannons.com Message-ID: User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463766271-1747220960-1483061400=:7749" Subject: [Edbrowse-dev] bad byte in NASA's vendor.js X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.23 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2016 01:30:01 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463766271-1747220960-1483061400=:7749 Content-Type: TEXT/PLAIN; format=flowed; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT Wow! I found something that can cause JS to crash, yet is more to do with our retrieval of javascript code files as large ascii files, rather than javascript-the-language. It happens in nasa.gov and may be one reason why nasa.gov stopped working. I was looking at all of the files successfully downloaded by curl as it tries to render nasa.gov, but when the run is still proceeding and has not yet aborted (assuming db5 is on). One of these files is: https://www.nasa.gov/sites/all/themes/custom/nasatwo/js/vendor.js?oinn2s Now let's say you make a test html file that will load only vendor.js. If you go to edbrowse and load this test file with db5, it says this: vendor.js line 89049: SyntaxError: missing ) after condition The bad line is like: if (!d.isValid() || !that.get('value')) { I played around with the bad line, and found that the syntax error is coming from an invisible character! So the following bytes can make the javascript processing of vendor.js fail, screwing things up downstream. 64 28 29 20 7C 7C A0 The 7C 7C is the "OR" double pipe symbols. So if you change A0 to a regular space, the syntax error goes away. 64 28 29 20 7C 7C 20 How about that! So is this something we can deal with someplace way more low-level than in parsing javascript code itself, such as in http.c when the bytes are retrieved? Will nasa.gov come back when we address this? Don't know yet, but this is definitely a necessary precondition. Kevin ---1463766271-1747220960-1483061400=:7749--