Loading ...
Sorry, an error occurred while loading the content.

208[Fwd: Re: ADsafe attack]

Expand Messages
  • David-Sarah Hopwood
    May 21, 2008
    • 0 Attachment
      -------- Original Message --------
      From: Douglas Crockford <douglas@...>
      To: David-Sarah Hopwood <david.hopwood@...>,
      Mark Miller <erights@...>
      Subject: Re: ADsafe attack

      I found three of Firefox's Array methods return window when called as
      functions.
      ADSAFE is now wrapping them:

      var mozilla = function (name) {
      var method = Array.prototype[name];
      Array.prototype[name] = function () {
      if (this === window) {
      error();
      }
      return method.apply(this, arguments);
      };
      };

      mozilla('concat');
      mozilla('reverse');
      mozilla('sort');

      I am worried about the extra Array methods (map, reduce, et al) but I
      haven't found a hole yet.
    • Show all 11 messages in this topic