UserPreferences

FireFoxBrowswer/BrowserExtensions/NamespaceConflict


Getting the OpenURL Referrer to work

I worked with Thomas Ventimiglia of [WWW]Openly Informatics, Inc. to debug Openly's [WWW]Openly's OpenURL Referrer, a FireFoxBrowser/BrowserExtensions for inserting OpenURLs into GoogleScholar search results. Our consultation resulted in Tom's tracking down and implementing [WWW]two bug fixes:

  1.0.8 (1/28/05):

        * Fixed bug involving Empty Profile Name Box/Error when creating new profile 

  1.0.9 (2/3/05):

        * Fixed bug involving namespace conflicts with other FF Extensions
          Special thanks to Raymond Yee and Richard Silverstein for helping us identify this elusive bug!

The basic problem was that the OpenURL extension was conflicting with another extension that I had previously installed ([WWW]copyurlplus, to be exact). The initialization routines for both extensions were named the same. So apparently, because copyurlplus had been installed first, the OpenURL extension ended up calling the initialization routine of copyrurlplus!

The workaround, in Tom's words: "The solution was to package all of our functions and global variables in a uniquely-named object that would not collide with anything in another extension's namespace." He then pointed me to [WWW]Coding For Portability, Part 1 » Thirteenth Parallel for further explanation.

I had been wondering about the interaction model among extensions, and had naively thought that extensions would have their own namespaces and that there was a very well-controlled model of interaction. This bug that Tom and I worked on shows that I was wrong.

Should we be concerned? I think so. Now that we have had a taste for this problem, a quick google search on "firefox extension namespace" shows that at least one other person has run into the same issue: Mark Bokil reports at [WWW]Microsoft's Peter Torr Attacks Mozilla Firefox Security - MozillaZine Talkback:

No answer yet.