Seamonkey

I’m very pleased to see a group stepping up to take control of Seamonkey. It’s something I’ve been working for, and I’m very glad to see it happen. The Mozilla Suite still has a lot of users this side of the Atlantic (there’s a distinctly European slant to the supporters list). Keeping this effort within the mozilla.org framework is a win for everyone involved.

One piece of advice for those striking out in a new and fresh direction: your first release (“Seamonkey Suite 1.0” or whatever it ends up being called) should not be a world-shaking event in browser technology development. Take time between now and the Firefox 1.1 release to get organised, plan and keep things ticking over, and then release something off that branch with as few changes as possible. Start Small and Simple, and build from there. You’ll have enough problems designing and implementing a properly-QAed release process without adding more bugs by changing the code.

Let a hundred browsers bloom :-)

Domain Usage Agreement Released

At long last, we’ve finally managed to produce an agreement people can sign if they want to use a domain name with one of the Mozilla Foundation trademarks in (e.g. “Firefox” or “Mozilla”). Apologies to all those people who have been waiting for this.

Free Binaries of Firefox

Six weeks ago, RMS emailed the Foundation to politely point out that the builds of Firefox we ship are not Free-as-in-speech. He’s quite correct in this assertion. We ship Talkback, a non-free crash-reporting tool, and there are also some provisions in the Firefox EULA which he suggested are non-Free as well, such as the restriction on removing the trademarks, and the requirement to follow US export regulations.

(I should point out at this juncture that the Firefox source code, as pulled and built from CVS, is Free, although it may be subject to restrictions until you remove any Mozilla Foundation trademarks. I’m looking for help to make it easier for people to avoid being subject to even those restrictions.)

We discussed the issues by email for a while, but other priorities intervened and not much progress was made. So, I went up to RMS after his talk at FOSDEM to apologise for the delay. He said (perhaps understandably) that he was tired of waiting, and planned to use FOSDEM to recruit some developers to make free binary builds, and release them under a different name.

So, on the Sunday during the Q&A in the Mozilla developer room, RMS asked someone to read out a short statement to that effect, asking people to email him if they were interested in helping make such builds. Having heard it, I responded by explaining the situation to the room, as outlined in this blog post.

The Foundation does hope to make Free binary builds available, with no Talkback, and a different EULA. Such builds would not be promoted by us, but anyone could point at their FTP directory and say “those builds are Free”. However our build engineer (Chase Phillips) is utterly exhausted after all the work necessary to get 1.0.1 off the ground, and is taking some time off. When he returns and things calm down, we hope to find time to make this happen.

Lies, Damn Lies, and Statistics

Amazing how a 15% market share growth in five weeks can be interpreted as bad news…

If Firefox was growing linearly, the percentage growth over constant time would be expected to decrease as the installed base got bigger. If the percentage value was maintained, we’d in fact be growing exponentially. The truth is probably somewhere between the two.

Help Wanted: Name-Changing Script

Recent events have convinced me that it’s important that we have a mozilla.org-blessed script which removes the “Firefox” trademark from the code. This could then be run by anyone wanting to make an “Iceweasel” browser under part 3) of the Trademark Policy, and they could be certain that they weren’t in any legal trouble. Basically, it would run over a freshly-pulled tree and change the word “Firefox” to a given string in a number of key files (such as brand.dtd) and other places.

Would anyone like to volunteer to write such a script? It would need to be in Perl, because it’s a language I know – the relicensing script was originally done in Python, and I had terrible trouble finding someone to maintain it. (I should say that the guy who I finally found is currently doing an excellent job.)

Let me know if you can help – but please don’t volunteer unless you consider yourself a reliable person ;-)

The Register on IDNs

<sigh> Kieren McCarthy, whose work I normally appreciate, has sounded off on the IDN issue in The Register without doing any research. The following is the letter I sent him, which I’m reproducing here in case anyone else is under any of the same misapprehensions.

FWIW, the three documents his article mentions, which were released by the registrar community, are also ill-informed in thinking we’ve disabled IDNs. This points to a communications failure that we should try and do something about. More on this when I’ve caught up on the 200-odd mails I have in my Inbox on the subject. (Irony noted.)

Sorry, Kieren, but much as I generally admire your work, 0 marks out of 10 for doing your research on this one. We haven’t disabled IDNs, as the follow-up post in my blog (or, heaven forbid, actually downloading the code and trying it) would have told you. All IDN domains in Firefox 1.0.1 and Mozilla 1.8b1 display in their punycode form. Given the timescales we had for releasing the 1.0.1 security update, this was the best solution we could come up with which dealt with the problem, but as we’ve made quite clear, it’s a temporary one only.

Paul Hoffmann, your “knowledgeable expert” you deployed to patronize us by proxy, may be an expert on IDNs, but he’s not an expert on browser or security UI design. Neither am I, but I know enough to tell him that his idea wouldn’t fly, and I did. The other two documents you link to are in fact guidelines for registries to implement to protect users – in fact, some of the very “ICANN guidelines” I mentioned. So, quoting them as an “everyone else disagrees” measure would rather suggest you hadn’t actually read them.

As for mozilla.org being parochial, it seems that I spend half my time answering well-meaning people who put forward ridiculous suggestions about how IDN domains can be “flagged” or “warned against” (Mr Hoffman included) when in fact our goal is to make them first-class domain names in the browser, alongside and equal with traditional domains. This thinking is laid out in my paper “A Plan For Scams” which I also wrote and blogged about recently.

So, just to set everything straight:

  • We haven’t disabled IDNs, just made them ugly in the short term.
  • We are getting together with the other browser and plugin manufacturers, the registry groups, some registrars, the IDN people and the Unicode people to sort something out that’ll work in the long term. Don’t worry – when we have, you’ll be the first to know :-)

Gerv

Update 9.42am: Don’t write emails quickly when in need of sleep. While most of the content above is right (having fixed some typos), as a kind friend has pointed out, the tone is not. I apologise to Kieren for sending him something so ill-considered.

Also, I didn’t mean to count Mr Hoffmann’s remarks among the “ridiculous” ones I’ve seen, only among those which recommended warning against IDNs in some way. So apologies to him, too.

Update 11.54am: and I can’t even spell his name right. Thanks to Smylers for spotting this one.

Auto-Sizing <iframe>s?

OK, here’s a technical problem to solve. I’ve been chatting with one of the administrators of a very large website (if you guess, keep it to yourself) which, as part of its function, displays user-provided content in the middle of site-provided pages. For historical reasons, the user-provided content needs to allow scripts, Flash and other dynamic content. However, they want to prevent such content affecting “their” part of the page, above and below the user content, and performing malicious actions. Currently, this can be done using either script or CSS-positioning or both.

I suggested that in general, their problem was unsolvable, but that the industrial-strength way of getting such separation was to use an <iframe>. He told me that they’d tried that, but as scrollbars internal to the page were unacceptable, they’d had to try resizing the iframe dynamically using JS to eliminate the bars. This solution had run into technical difficulties, as explained in the following saga, some of which I don’t quite follow.

Read it for background if you think it helps – but the question is: how hard would it be to get an <iframe> or <object> which always resized to its content? The solution can involve either JavaScript, or hacking Gecko.

Currently in Gecko, as far as I can tell, if you don’t set a width and a height, <object> tags of type e.g. image/png size to their content. So why can’t (or why don’t) <object> tags of type text/html?

Here’s the story:

Here was the general process under which we went through to implement iframes:

The Problem: The users enter malicious content on the page that can overwrite our page content as well as steal cookies since it’s in the same domain.

Our proposed solution: We want to separate the user data on the page from our site content. The most esthetically clean way to do this was inside of an iframe that is automatically resized to avoid having embedded scrollbars which our user community would never be okay with.

How it was implemented: We wrapped the content inside of JavaScript to detect the vertical height of the page and then render the iframe appropriately to avoid any scrollbars inside the page itself. When we tried to roll this out we encountered massive problems.

  1. Any items with links, when clicked on only redirected the main page. We solved this issue for the most part, except for Applets, objects, etc… We would be willing to take this hit and force our developer community to change their code to support this. This is somewhere around 10-30% (the number is hard to calculate since it isn’t a part of the page, it’s a part of the code hosted elsewhere).
  2. Tables rendered badly. This ended up being the show-stopper. Users would put dozens of large images into tables and wouldn’t put sizes on the images. This would cause the page to sit there for minutes in some cases because the table wouldn’t finish loading so our JavaScript wouldn’t render the entire table until every last image were loaded. So next we attempted to change it so that every image pre-loaded as a 1×1 pixel image. That worked okay, but the only way to do that was to wrap the entire user’s content in <noscript> tags. The problem with that was that once we encountered an end </noscript> tag it would start rendering again. IE:

    <noscript>
    User content
    <script>
    //Some javascript
    </script>
    <noscript>
    You don’t support JS
    </noscript> <— at this point it breaks our <noscript> block
    More user content with tables, etc which breaks our code…
    </noscript>

    At the time <noscript> was found on 22% of user input. Now it is closer to 2-3% due to some changes we have made, although that number is still too high to implement this solution. The users would also do really bizarre things with their code like have weirdly malformed tables, and JavaScript that outputted </noscript> tags. The fact that there was no way to completely stop text from rendering so that we could pause it and run JS over the code made this approach unfeasible after months of testing.

  3. It broke save-as in IE, which we don’t care about that much, but it was a big deal in certain countries, as users really like to save data to their desktops to prove that they saw it and agreed to whatever was said on the page. We can get around this issue by allowing a save-as friendly version that can only be linked to from our own page, but it’s less than ideal.
  4. Certain forms of popups still allowed some forms of overwriting (both Netscape and IE verified – although SP2 has fixed some of these issues since that time).
  5. When users resized during render time it became an issue because of the weird way in which the JS was written… it would be making assumptions about a size that was no longer accurate.
  6. It caused JS errors with pages that attempted to resize themselves.
  7. Browser support – with iframes and JS required for this to work it only supported ~90% of browsers.

Based on our discussion the right idea would be to have a different form of iframe that resizes to the size of the page it is calling to avoid the embedded scrollbar issue. If we could make this a standard we might even be able to get higher than the ~90% we found in #7 of the problems list.

Staying Safe From Phishing With Firefox

I’ve written a spec for Firefox’s anti-phishing features, in the form of a document which explains to the user how they can stay safe from phishing using Firefox.

Staying Safe From Phishing With Firefox.

The idea is that the statement represents the minimum work we need to educate users to do to stay safe, and that Firefox’s anti-phishing features should be designed in such a way as to always make that statement true. There’s a discussion page which talks about this in more depth.

I’d be very interested in feedback of the following forms:

  • You can actually make the user have to do even less work than that by…
  • You can make it easier for the user to understand what they have to do by…
  • Your advice does not protect the user in the following situation…

New Short-Term Patch For IDN-based Spoofing

Darin Fisher, network supremo, has pulled it out of the bag and come up with a less drastic short-term solution to the IDN problem. It has just been checked in for all three upcoming releases. Read about it over in bug 282270, but basically IDN will still work, but all occurrences of IDN domains in the browser UI (URL bar, security info etc.) will be the punycode form. There is a pref to re-enable full IDN – set “network.IDN_show_punycode” to false. As with the previous plan, this preference will be set to true in all official builds.

As I’ve said in previous blogposts, turning off IDN entirely was always an suboptimal solution, and I’m very pleased we’ve managed to find a third way. The search goes on for something better long-term – I’m sure you’ll all agree that, while showing the punycode domain all the time solves the immediate spoofing problem, the fewer browsers out there that do it, the better.

Could I please add a plea that before anyone posts comments on bugs or blogposts suggesting their incredibly simple idea for solving the issue completely, could they please read at least some of the previous posts, bugs, discussions and papers written about the subject? Thanks :-)

IDN Policy Clarifications

There are some issues that I didn’t make clear enough in my last IDN policy post.

  1. Turning off IDN is a temporary measure for Firefox 1.0.1, Mozilla 1.7.6 and Mozilla 1.8 beta, all of which are due for release in the next couple of weeks (this week, ideally), to target this and other security issues. I personally am confident that this will not be the long term solution. We hope to engineer the disablement in such a way that we can later return the pref to whatever value the user had it set to before we started.
  2. I am very keen on the long-term solution being a TLD whitelist or blacklist. Whether this is feasible, and which of the two we have depends on the scope of the homograph problem, which we are still trying to determine – and that’s something we need your help with. This solution would avoid penalising registrars/registries who are doing the right thing, while protecting our users. The main reason this is not being implemented for 1.0.1 is the timescale.
  3. We have considered a lot of other solutions also – warning bars, icons, tooltips, you name it. Such things have the disadvantage of needing coding and testing (so can’t be quick) but also usually have the disadvantage of discriminating against IDN as a class of domains, which we do not want to do. Please read my thoughts on “Solution Requirements” in my “Phishing – Browser-based Defences” paper for my views on what solutions are and are not acceptable for phishing problems.
  4. We are not being Anglocentric here – or rather, we are not being more Anglocentric than the DNS system has been for the last 30 years.
  5. As a general point, we understand that preserving our reputation for security may require inconveniencing users some of the time. While each case is evaluated on its own merits, people should not be surprised if you see other things temporarily disabled in future.

Now, to talk about what other people are saying:

Paul Hoffman may know more about IDN and Unicode than I do, but as someone who has done a lot of thinking about browser UI, I can tell him that an “IDN explanation popup” will not be read. Also, merely indicating whether a domain name is IDN or not is useless unless there’s some inference that a user can draw from that. “It’s suspicious” is presumably not the inference he wants people to draw. And if one IDN domain spoofs another one, the icon will be similarly present on both.

He and others (including some advice issued by the IDN community) have also suggested that you can solve the problem by indicating the class of each character by changing the background colour. Leaving aside the problems this causes for the 5% of the population who are colour blind, this will merely make the location bar ugly. Users will either complain loudly about the ugliness and ask to turn it off or, if reconciled to it, either get used to the dancing array of colours behind the domains they visit (non-English users) or treat any change in colour as suspicious (English users). Both are bad outcomes, and neither improves security.

He can rest assured that we neither want to turn IDN off (permanently), nor do we want to make IDN use obnoxious. We would like IDN domains to work as beautifully and simply as non-IDN domains, and that’s the goal we are shooting for.

Security and UI Developers Wanted

Software from mozilla.org has a good reputation for security, and we’d like to keep it that way. Dan Veditz, a long-time Mozilla contributor and ex-Netscape employee, was hired a year ago by the Mozilla Foundation to work full time on security issues, and the Foundation will soon be looking to recruit additional resource in this area.

But the project is bigger than just the Foundation, and our security story needs additional help. One place where we could do with reinforcements is in PSM (Personal Security Manager) – the security UI for the Mozilla Suite, and to some extent Firefox and Thunderbird too. This builds on top of our excellent NSS security libraries and other code to expose security control to the user.

PSM needs help in two ways – help at a code level with maintenance of an important part of our software and, in the more general sense, help in tackling the larger UI problem that security presents.

Exposing control of our security infrastructure in a way that gives sufficient flexibility, but is easy for users to understand is a big challenge. In the past, we’ve probably not done as well as we might on the “easy to understand” part. We hope that some people will step up to the plate to take part in collaborative, iterative, open UI development to improve our products in this area.

If this sounds like you, contact chofmann or dveditz.

Yahoo! Toolbar for Firefox

Yahoo! have released a beta of their search toolbar as a Firefox extension (release notes). The blog post says: “the Yahoo! Toolbar Beta is just one of many Firefox goodies you can expect to see from us this year, so stay tuned.”

Point of interest:

  • It’s the first digitally-signed Firefox extension I’ve come across
  • It’s out for Firefox first – “Please check toolbar.yahoo.com again in the future for updates that will support Mozilla and Netscape”
  • It only works for US-based Yahoo IDs, and has only been tested on Windows

How To Put Licence Blocks In Files

I’ve been working on the relicensing project recently, and it seems the following instructions are necessary.

When adding licence blocks to files:

DO:

  • Always use a clean copy of the boilerplate
  • Including all of the boilerplate, especially the BEGIN/END markers
  • Fill in the marked fields appropriately
  • Always use the same comment character for all parts of the block
  • In line-based comment styles such as “#”, separate the licence from other comments by a blank line

DON’T:

  • Copy and paste entire licence blocks between files
  • Invent your own block by adding comment markers to the uncommented boilerplate (unless you need a comment style not provided, in which case make it match other examples exactly)
  • Add other text to the licence comment block
  • Take a block of one comment type (e.g. “<!–“) and put it into a file surrounded by comment markers of another type (e.g. “/*”).

There is an exception to the last rule. You may put “#” blocks inside other comment styles in files which the XUL preprocessor runs over, as long as the surrounding comment markers are each on their own separate line, as follows:

/*
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
...
#
# ***** END LICENSE BLOCK *****
*/

Mafiazilla?

Fancy earning $18,500 a month ($222,000 a year) tax free, as part of a team of eight people working for a secretive organisation, living on an island in the Mediterranean and hacking on Mozilla? Then HJ has a job offer for you.

– you better inform us about who you are and what you did in the past, because we will get a hold on it anyways.

There’s only one plausible explanation. You will be coding Mafiazilla.