From 12f5d1b0fe65e1871053d0aedb24d9dab514e752 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 19 Mar 2009 19:12:33 -0400 Subject: [PATCH] Fix IE8 bug with JavaScript. Signed-off-by: Edward Z. Yang --- NEWS.txt | 9 +++++++++ csrf-magic.js | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/NEWS.txt b/NEWS.txt index 1ef5909..946d917 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,15 @@ [[ news ]] +1.0.3 unknown release date + + [BUG FIXES] + + - Internet Explorer 8 adds support for XMLHttpRequest.prototype, + but this support is broken for method overloading. We + explicitly disable JavaScript overloading for Internet Explorer. + Thanks Kelly Lu for reporting. + 1.0.2 released 2009-03-08 [SECURITY FIXES] diff --git a/csrf-magic.js b/csrf-magic.js index 6992402..243e37e 100644 --- a/csrf-magic.js +++ b/csrf-magic.js @@ -108,7 +108,9 @@ CsrfMagic.end = function() { } // Sets things up for Mozilla/Opera/nice browsers -if (window.XMLHttpRequest && window.XMLHttpRequest.prototype) { +// We very specifically match against Internet Explorer, since they haven't +// implemented prototypes correctly yet. +if (window.XMLHttpRequest && window.XMLHttpRequest.prototype && '\v' != '\v') { var x = XMLHttpRequest.prototype; var c = CsrfMagic.prototype; -- 2.11.4.GIT