Incompleteness 2011-12-16T12:22:33+00:00 Joe Walker console.mihai(); 2015-02-16T00:00:00+00:00 <p><strong>Update:</strong> Mihai consistently defied people that told him how long he had. It's over 3 months since he was given <a href="">several weeks</a>, and years since he was given months. He died on 23 April 2015.</p><hr><p>A few days ago <a href="">Mihai Șucan</a> went home to Romania. We're not expecting him to fix any more bugs in Firefox, but I'd like to raise a glass of <a href="">Țuică</a>, to the 1919 bugs that he has been involved in fixing in Firefox.</p><p>Devtools at Mozilla has only been a serious thing for a bit under 5 years. Firebug is much older, but wasn't really a Mozilla project. We started for real in the middle on 2010, and Mihai was one of the first people to start helping.</p><p>The console code was initially a complete mess. Code that everyone touched and no-one loved, born before there was momentum, when landing code was a dark art.</p><p>I remember more than once looking at console code thinking - 'I can do the right fix in a few weeks or the wrong fix in a few hours', and like many before me, leaving the root problem for someone else to fix.</p><p>That someone was Mihai.</p><p>Most of the Devtools team at Mozilla is remote, so all I knew of Mihai to start with, was his strange voice. I'm no expert on Romanian accents, but this was different. His voice was compressed and clearly a struggle. He coughed regularly. So we listened more carefully when he spoke and thought nothing of it.</p><p>And Mihai continued to fix the console. Kevin Dangoor, who ran Devtools at the time said to me once - "You know the problem with Mihai is simply feeding him enough bugs - that's nearly a full time job!"</p><p>When video chat became a thing, I think we all noticed Mihai's hands, and wondered how he typed, but were probably too embarrassed to ask what was up.</p><p>I'm not sure who asked first, but around the time we first all got together in London I asked if he could travel easily, and found out the detail.</p><p>Mihai has <a href="">Epidermolysis Bullosa</a> (sometimes known as E.B.) specifically - Recessive Dystrophic Epidermolysis Bullosa.</p><p>E.B. is a brutal skin condition which causes chronic blistering, and makes everyday objects dangerous. Those with it are sometimes called butterfly children because of their brittle skin. In Mihai's case it has left him in a wheelchair, and having to very gently punch the keyboard to get anything done.</p><p>E.B. makes you very vulnerable to skin cancer from the continued scarring from the blisters. So everyday objects that wouldn't pose a risk to those with normal skin become sharp and dangerous to people with E.B. Needless to say - anyone with E.B. has a huge mountain to climb every single day.</p><p>When presented with the mountain that <em>just existing</em> presents to EB sufferers, I think many people would be happy to just exist. But that's not Mihai, who has made developer tools for the web a personal mission. There aren't many things you can do when the outside is so dangerous, but Mihai found something he could do and did it with a passion.</p><p>Mihai's illness has meant he hasn't been able to work on the console recently, and we've probably not adjusted properly, but that's temporary.</p><p>Mihai's legacy is that there are hundreds of millions of people using a product, Firefox, that Mihai contributed to, hundreds of thousands of them spend a significant proportion of their time in the console that was his responsibility. And there are billions of people using websites created by people directly helped by Mihai's work.</p><p>In all but his darkest moments, Mihai copes without complaining. The annoying molehills that we complain about are largely irrelevant sideshows to Mihai, and working with him has been an honour.</p><p>If you've used Firefox Devtools, or if you've used any website where the author might have used Devtools, or if you're impressed by what Mihai has overcome, there's <a href="">EB Research</a> which investigates the root causes and solutions to the problem of EB.</p><p>Mihai always wants to do more, but he needs your help with this bit: <a href="">EB Research</a>.</p><iframe src="" allowfullscreen="" frameborder="0" height="360" width="640"></iframe><p>(The video in this post is from a series created for <a href="">DEBRA</a> international by Lowe GGK. The full set of <a href="">images</a> and <a href="">videos</a> is well worth a look)</p> Combatting Self-XSS (Part 2) 2014-04-24T17:30:00+00:00 <p>The immediate context to this post is <a href="">Self-XSS</a> but it may have a wider context in avoiding other Internet scams.</p><p>I’d like to frame Self-XSS in terms of a human script execution engine. It’s an interpreter - and probably not JITed, but it works with a broad and poorly specified grammar. Not all humans have the same interpreter, but there’s enough of a dominant language to provide a mono-culture which makes attack easy.</p><p>However not all script execution engines are created equal. Some come with advanced scam detection routines. Some have random timeouts and many have surprising execution errors. It’s not my intention to be derogatory, but it’s a fact that not everyone has English skills the same.</p><p>So Self-XSS is a script that uses this script execution engine to coerce someone to do the attacker’s bidding, probably to their own detriment. If you're writing a scam script, you need to keep the scripts simple enough to avoid the victims’ scam-detection, timeouts and errors.</p><p>These problems mean that we might be able to draw a graph of script complexity vs completion rate (where ‘completion’ is a scam that succeeded). It might look like this:</p><img src="" alt="Graph of complexity vs completion rate showing exponential drop off"><p>I’d like to suggest that humans are not that simple and that we shouldn’t expect something as predictable as that.</p><p>Many (most?) of the tasks that we complete on computers can be done purely using unconscious / heuristic / system 1 processing (in <a href="">dual process</a>) terms. That is to say using parts of the brain that are fast, pattern-based and non-analytical. Its less common that we need to use conscious / systematic / system 2 processing (slow, lazy, analytical). (“Thinking, Fast and Slow” is probably the canonical work to understand these terms in more depth)</p><p>I’d suggest that, for most people, scam detection is a system 2 operation. So forcing use of system 2 to prevent scams might help. (Obviously this is at odds with the “<a href="">don’t make me think</a>” approach to good UX design - I’m obviously not arguing that bad design is a good thing).</p><p>We don’t have a lot of data for Self-XSS. The data that I know of is:</p><table> <tbody><tr> <th>Attack</th> <th>Completion Rate</th> <th>Complexity</th> </tr> <tr> <td>Facebook</td> <td>&lt;10%</td> <td>3 steps</td> </tr> <tr> <td>Win+R [1]</td> <td>&lt;1%</td> <td>5+ steps</td> </tr> <tr> <td>Other attacks [2]</td> <td>&lt;1%</td> <td>4+ steps</td> </tr> </tbody></table><p>It seems reasonable that an infinitely simple script would always succeed, and that at some point of complexity the completion rate will drop to 0. So that something like 5 data points.</p><p>It would be fair to criticise this as ‘not much data’, which is part of the point:</p><ul> <li>If you have more data in places where Self-XSS attacks have worked, please publish them and tell me.</li> <li>If you know of research into the use of system 1 vs. system 2 in detecting scams, I’d love to hear about it.</li> </ul><p>However, given the lack of data, it seems to me that there is a surprising drop-off in completion rate with increasing script complexity. There isn’t much any evidence for attacks that were somewhat complex, and got some people - it looks as though all attacks that were somewhat complex were surprisingly unsuccessful.</p><p>So the drop-off rate might look something a bit more like this:</p><img src="" alt="Graph of complexity vs completion rate showing more sudden drop-off than before"><p>Which might in some small way indicate a point in script complexity where system 2 needed to get involved, and where the analytical part of system 2 said “Wait, am I being scammed?”</p><p>Summary: We shouldn't think of scams purely in terms of smart people not getting scammed, and some sort of level of intelligence providing scam protection. Perhaps for many people, scams are detected when system 2 gets involved, and there may be ways in which we can design software to protect people.</p><p>How does this affect browser developer tools? I believe that we have solutions [3] to the problem that tailor the addition of complexity only to places where people are most at risk, so 99.99% of people won't be affected. Also the level of complexity that is being added is a low as it can be whilst still being effective.</p><p>Notes:</p><p>[1]: Pressing Win+R on Windows systems gets you a system level command prompt. I have no evidence that this has been used in Self-XSS attacks, probably due to limitations in cmd.exe forced an attack script that is 5 or more steps.</p><p>[2]: I've seen several demonstrations of Self-XSS that involve 4 or more steps, but none that have a high completion rate.</p><p>[3]: Relevant bugs: Firefox <a href="">994134</a>, <a href="">664589</a>, <a href="">953166</a>, also Chromium <a href="">345205</a>, </p> Work for Mozilla building Developer Tools 2013-03-7T16:30:00+00:00 <p><strong>Update</strong>: We've hired now, and very happy that Brian and Patrick are on the team.</p><p>Short version: <a href="">Paul</a>, <a href="">Heather</a>, <a href="">Mike</a> <a href="">and I</a> are hiring. <a href="">Apply here</a>.</p><p>The built-in developer tools are mostly <a href="">built in JavaScript</a>. So you'll need to be comfortable with using JavaScript to create applications (rather than just tweaking pages). Obviously our tools are just for Firefox so we can take advantage of <a href="">ES5</a> and <a href="">ES6</a> features the second they're added to Firefox so knowing about what's new would help too.</p><p>But our team is particularly about helping people understand content (i.e. HTML and CSS) so you'll also need to understand how pages are laid out and how to get a browser to bow to your bidding. You'll also need to be good at creating interfaces that people want to use, and fast at learning because there's a lot to <a href="">our platform</a>. Knowing some C++ could be useful too.</p><p>Perfect would be if you've spent time in the trenches of web development thinking "<em>If only the tools would tell me X, Y and Z, I could be soooo much better</em>". This is your chance to make millions of people better at their jobs.</p><p>Our team is all around the world, so you can enjoy working from home, and you'll need to communicate well over IRC, video chat and email. But you'll also be working on open source software that changes the lives of hundreds of millions of users worldwide.</p><p>If you can help, <a href="">apply here</a>, and contact me directly (<a href="">twitter</a> or <code>jwalker at</code>) to make sure you're in the system, or to ask questions.</p> Hackathon Summary 2012-06-27T13:00:00+00:00 <p>So yesterday a whole bunch of people to together to hack on some commands for the new <a href="">Developer Tools Command Line</a>. Thanks to everyone that took part.</p><p>This is a quick summary of the commands and hacks that we created. We've now got to work out what to do with them. Some we'll clean up, localize, test and ship, and some we'll do some we'll suggest putting onto AMO.</p><table> <tbody><tr> <th>Command</th> <th>Description</th> <th>Author(s)</th> <th>Source</th> </tr> <tr> <td>color</td> <td>Several commands to convert between rgb, hex, hsl and color names</td> <td><a href="">elvisds</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>scratchpad</td> <td>Extra commands to open a empty and pre-<span>populated scratchpads</span></td> <td><a href="">Rob Campbell</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>debugger</td> <td>Several commands to control the debugger</td> <td><a href="">Victor Porof</a></td> <td><a href=";action=diff">Patch</a></td> </tr> <tr> <td>tilt refresh</td> <td>Rebuilds the visualization 3D mesh and webpage texture if any changes to the DOM were made</td> <td><a href="">Victor Porof</a></td> <td><a href=";action=diff">Patch</a></td> </tr> <tr> <td>calllog</td> <td>Use new Debugger API to log function calls</td> <td><a href="">Blair McBride</a></td> <td><a href="">Repo</a></td> </tr> <tr> <td>idl</td> <td>Show the IDL file for a specified XPCOM int<span>erface</span></td> <td><a href="">Blair McBride</a></td> <td><a href="">Repo</a></td> </tr> <tr> <td>memory</td> <td>Get a memory report for the current page</td> <td><a href="">Blair McBride</a></td> <td><a href="">Repo</a></td> </tr> <tr> <td>restart</td> <td>Commands to restart Firefox</td> <td><a href="">Girish Sharma</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>sorttabs</td> <td>Sorts visible tabs based on url</td> <td><a href="">Girish Sharma</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>addon</td> <td>Commands to enable and disable plugins</td> <td><a href="">Mike Ratcliffe</a>, <a href="">Panagiotis Astithas</a>, <a href="">Pimm Hogeling</a></td> <td><a href="">Gist 1</a>, <a href="">Gist 2</a></td> </tr> <tr> <td>time</td> <td>Time how long it takes a command to run</td> <td><a href="">Marten Schilstra</a></td> <td><a href="">Patch</a></td> </tr> <tr> <td>date</td> <td>Prints the date to the command line</td> <td><a href="">Marten Schilstra</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>responsive</td> <td>Commands to control responsive mode</td> <td><a href="">Paul Rouget</a></td> <td><a href="">Patch</a></td> </tr> <tr> <td>loadscript</td> <td>Loads a JavaScript resource into the current page</td> <td><a href="">Marten Schilstra</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>mdn</td> <td>Searches the Mozilla Developer Network</td> <td><a href="">Marten Schilstra</a>, <a href="">Paul Rouget</a></td> <td><a href="">Gist 1</a>, <a href="">Gist 2</a></td> </tr> <tr> <td>find</td> <td>Go to a tab (fuzzy matched)</td> <td><a href="">Thaddee Tyl</a></td> <td><a href="">Repo</a></td> </tr> <tr> <td>search</td> <td>Search and replace in page</td> <td><a href="">graememcc</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>bug</td> <td>Open a numbered bug</td> <td><a href="">zombie</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>basename/dirname</td> <td>Split up file paths</td> <td><a href="">Nick Fitzgerald</a></td> <td><a href="">Pull</a></td> </tr> <tr> <td>qsa</td> <td>Perform querySelectorAll on the current document and return number of matches</td> <td><a href="">Zach Carter</a></td> <td><a href="">Gist</a></td> </tr> <tr> <td>jsbeautifier</td> <td>Loads a URL, JS-beautifies it, and opens a new tab with the result</td> <td><a href="">Mike Hanson</a></td> <td><a href="">Repo</a></td> </tr> <tr> <td>replace/rm/export</td> <td>Commands to edit and export page details</td> <td><a href="">Mihai Sucan</a></td> <td><a href="">Pull</a></td> </tr> </tbody></table><p style="text-align:center;"> <a href=""> <img src="" alt="people hacking"> </a> </p> Command Line Hackathon Details 2012-06-24T13:00:00+00:00 <p>I <a href="">promised</a> details of how to take part in the command line hackathon on June 26th ...</p><h2>Getting Started</h2><p>The command line is part of the developer toolbar, which is currently prefed off. You enable it by visiting <code>about:config</code> in Firefox and setting <code>devtools.toolbar.enabled</code> to true and restarting.</p><p>Then use the new Tools → Web Developer → Developer Toolbar menu or press <code>Ctrl+Shift+V</code> (Win/Linux) or <code>Alt+Cmd+V</code> (Mac) to open the toolbar</p><p>If you want a way to keep your commands around, you'll want to use the command directory method, if you just want a quick hack, use scratchpad.</p><h3>Creating commands with Scratchpad</h3><p>Make sure you've <a href="">enabled chrome privileges on your scratchpad</a>. Then <a href="">start with a template like this</a>, and your ready to play.</p><p>See the docs <a href="">creating commands with scratchpad</a> on MDN for more.</p><h3>Creating commands from a Command Directory</h3><p>Find somewhere to store commands and copy <a href="">this template</a> to a file called <code>hello.mozcmd</code> (or you could clone the repo which could come in handy for submitting your commands). The filename isn't important but it should end <code>.mozcmd</code>. Then tell Firefox where your directory is with this command: <code>pref set devtools.commands.dir &lt;PATH-TO-DIR&gt;</code>.</p><p>Then refresh the commands from the command dir using <code>cmd refresh</code> and try out the new command: <code>hello</code>.</p><p>See the docs <a href="">creating commands with scratchpad</a> on MDN for more.</p><h2>Finding Out More</h2><p>You can probably guess most of what you need from <a href="">the example</a>, however there is <a href="">documentation and links</a> on MDN if you need more detail.</p><h2>Taking Part</h2><p>We're collecting ideas for commands on <a href=""></a>, and we'll keep that updated during the day to coordinate things.</p><p>To get help and support, the best option is #devtools on (SSL:on, Port:6697) or see <a href="">the connection docs</a> or use IRC on the web at <a href=""></a> (Connect to Mozilla, Channel: #devtools).</p><div> <a href=""> <img src="" alt="people hacking"> </a> </div><h2>How to raise a bug</h2><p>Use <a href=";;blocked=&amp;bug_file_loc=http%3A%2F%2F&amp;bug_severity=normal&amp;bug_status=NEW&amp;cf_blocking_basecamp=---&amp;cf_blocking_kilimanjaro=---&amp;cf_crash_signature=&amp;cf_status_esr10=---&amp;cf_status_firefox13=---&amp;cf_status_firefox14=---&amp;cf_status_firefox15=---&amp;cf_status_firefox16=---&amp;cf_tracking_esr10=---&amp;cf_tracking_firefox13=---&amp;cf_tracking_firefox14=---&amp;cf_tracking_firefox15=---&amp;cf_tracking_firefox16=---&amp;comment=%0D%0AWhat%20did%20you%20do%20%28steps%20to%20reproduce%29%3F%0D%0A%0D%0A%0D%0AWhat%20happened%3F%0D%0A%0D%0A%0D%0AWhat%20should%20have%20happened%3F%0D%0A%0D%0A&amp;component=Developer%20Tools%3A%20Console&amp;contenttypeentry=&amp;contenttypemethod=autodetect&amp;contenttypeselection=text%2Fplain&amp;data=&amp;defined_groups=1&amp;dependson=&amp;description=&amp;flag_type-203=X&amp;flag_type-325=X&amp;flag_type-37=X&amp;flag_type-41=X&amp;flag_type-5=X&amp;flag_type-607=X&amp;flag_type-720=X&amp;flag_type-721=X&amp;flag_type-737=X&amp;flag_type-748=X&amp;flag_type-775=X&amp;flag_type-780=X&amp;flag_type-781=X&amp;form_name=enter_bug&amp;keywords=&amp;maketemplate=Remember%20values%20as%20bookmarkable%20template&amp;op_sys=All&amp;priority=--&amp;product=Firefox&amp;;rep_platform=All&amp;requestee_type-203=&amp;requestee_type-325=&amp;requestee_type-41=&amp;requestee_type-5=&amp;requestee_type-607=&amp;requestee_type-748=&amp;requestee_type-781=&amp;short_desc=GCLI&amp;status_whiteboard=&amp;target_milestone=---&amp;version=Trunk">this link</a> to tell us about any problems with the command line.</p><h2>Submitting a Command</h2><p>You can submit a command any of the following ways:</p><p> </p><ol> <li>Fork <a href="">this repo</a> and create a pull request (preferred)</li> <li>Create a new etherpad containing your submission and put a link to your new etherpad in the <a href="">main etherpad</a></li> <li>Email it to jwalker at</li> </ol><p>Whichever way you choose, please include the following in your submission so we know you're happy for us to distribute your work:</p><p><code>Signed-off-by: Your Name &lt;;</code></p><p>Adding this text is a statement that you have the right to contribute the code under the MPLv2 for inclusion in the Mozilla codebase.</p><p><strong>Hope to see you on June 26th</strong></p> Firefox Command Line Hackathon 2012-06-20T12:00:00+00:00 <p>TL;DR: On June 26th, the Firefox developer tools team is holding a hackathon to add to the list of commands for the Firefox developers toolbar. </p><aside> <a href=""> <img src="" alt="people hacking"> </a> </aside><p>See this recent <a href="">blog post for context on the new developers command line</a>. </p><p>I'm in the process of finishing off <a href="">bug 724055</a> which will make it as easy as is possible to create new commands, just set a pref to point to a directory where your commands are stored in JSON (ish) files, and you're done. </p><p>In the next few days I'll update this post (Update: <a href="">see here</a>) with a set of resources for creating commands and ideas for commands. We'll hang out in IRC and crank away and see how many commands we can get written in a day. </p><p>If you can spare some time, we'd love to have some help. </p><p><small>Update: Originally this post had a date typo and said the 27th. The real date is the 26th.</small> </p> Firefox Command Line for Developers 2012-06-18T12:00:00+00:00 <p>TL;DR: We're adding a toolbar to Firefox, for developers, which includes a command line. It's a great place to add small tools and experimental features, and we're making it easy to add your own commands. </p><p>The toolbar should land in Firefox 16 or 17 and will look like this: </p><div style="overflow-x:hidden;"> <img src="" alt="GCLI on a Mac"> </div><p>The buttons are useful, but I'm most excited about the commands. We can add an almost unlimited set of commands here without cluttering up the UI, or making things slow, and we've done lots of work to make the command line easy to use. </p><p>The challenge: It might be stretching things a little to call the command line a 'platform', and commands 'apps', but the command line still needs commands to be successful. There's a list of commands that we're working on for manipulating Firefox developer tools, and we'll be expanding this list to include system level commands too. </p><p>We're planning on a hackathon in a couple of weeks to add to the list of commands and to check that it really as as easy as we think it is to extend. Details soon. </p><p>If you want to try it out, it's in Nightly now, you'll need to flip the <code>devtools.toolbar.enable</code> preference in <code>about:config</code>. </p>