Remove infinite loop of sending a message to the page, then receiving that message...
authorMark Donnelly <mark@painless-security.com>
Fri, 3 Oct 2014 20:16:31 +0000 (16:16 -0400)
committerMark Donnelly <mark@painless-security.com>
Fri, 3 Oct 2014 20:16:31 +0000 (16:16 -0400)
chrome/app/gssweb.contentscript.js

index 1708612..dce39c6 100644 (file)
@@ -32,6 +32,12 @@ window.addEventListener("message", function(event) {
     if (event.source != window)
        return;
     
+    // Check to see if this message's data is data we care about
+    if ( typeof(event.data.method) == 'undefined' ||
+         typeof(event.data.arguments) == 'undefined' ||
+         typeof(event.data.return_values) != 'undefined' )
+        return;
+    
     if ( typeof(event.data.cookies) == 'undefined' )
     {
       event.data.cookies = {};