Ascrod / ambassador

Fork of ChatZilla for the Unified XUL Platform.
Mozilla Public License 2.0
34 stars 7 forks source link

Keys in Collections of CIRC Objects conflict with built-in JS properties #67

Closed Ascrod closed 5 years ago

Ascrod commented 5 years ago

Using the canonicalName as the key to a collection of CRICChannel or CIRCUser objects can have disastrous results if the canonicalName is the same as a built-in JavaScript property. One such example is if user "__proto__" or "__parent__" joins a channel.

Existing bug from ChatZilla. Refer to these bugs and the accompanying patch. I suggest replacing the use of canonicalName with collectionKey, which is just ":" + canonicalName, as per the recommendations in 498178.

Bug 498178 Bug 703423 Patch 427892