View Issue Details

IDProjectCategoryView StatusLast Update
0000035SOGo Connectorpublic2010-06-17 22:18
Reporterleni Assigned To 
Status newResolutionopen 
Summary0000035: sogo connector thunderbird extension pollutes global javascript scope which affects other addons

To reproduce:

Initiating a sync from Tools/Zindus/Sync Now works fine, because here, zindus addon runs in into own scope.

However, initiate 'Sync Now' by right-clicking on the status bar and it fails. Open Tools/Error Console and notice:
reference to undefined property XpathResult.ANY_UNORDERED_NODE_TYPE

This is an object that Thunderbird places in global scope:
which has been interfered with by the SOGO connector.

Uninstall the connector and the erroreous behaviour disappears, ie
XpathResult.ANY_UNORDERED_NODE_TYPE has the expected value (8)

I'm sure there are other easier ways of reproducing this - you can probably test it easily from within the connector.

Also, even without installing the zindus addon, it is clear that the connector is interfering with objects in global scope - just look at the error console after installing the connector and restarting Thunderbird.

For examples of how to fix this, see:

TagsNo tags attached.




2010-06-17 14:42

viewer   ~0001114


First of all: does this bug still occur on your side ?

SOGo Connector makes no use of XPathResult therefore I don't know what happens here. Of course, I have not tested yet and I cannot currently since the zindus extension triggers an exception in my environment.

On the other hand, looking at the code of Zinduz there is namespace pollution there too. We attempt to avoid thisby prefixing our functions and objects with "SC" but there is never any guarantee....



2010-06-17 22:18

reporter   ~0001117

I suspect that if you install the zindus addon into a new profile, or uninstall the SOGO addon from your current profile, you may find that it does not trigger an exception.

The zindus addon inserts exactly one name into the global namespace: ZindusScopeRegistry. The rest of the addon lives within that namespace. Whereas with the sogo addon, many, many functions are in the global namespace.

I only filed this bug because a user complained when they tried to use the two addons together. If you have found in your testing that they are still incompatible then I suspect the problem remains, namely that the sogo connector is polluting the global namespace.

Why the problem manifested with XPathResult I can't say. However if you have found that the zindus addon is still triggering an exception it may give you a clue on how to reproduce the problem without the zindus addon. ie with a test case involving just the sogo connector and a little javascript snippet that you can copy/paste into the error console (leaving the zindus addon out of it).

Issue History

Date Modified Username Field Change
2009-07-02 06:15 leni New Issue
2010-06-17 14:42 wsourdeau Note Added: 0001114
2010-06-17 22:18 leni Note Added: 0001117