[Pkg-javascript-commits] [sockjs-client] 151/350: Only accept valid iframe messages
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:03:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit ea6f7eca0e39bda831022ddeaf7164374b22d652
Author: Bryce Kahle <bkahle at gmail.com>
Date: Thu Oct 16 19:51:35 2014 -0400
Only accept valid iframe messages
---
lib/transport/iframe.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/transport/iframe.js b/lib/transport/iframe.js
index 989344a..75a9187 100644
--- a/lib/transport/iframe.js
+++ b/lib/transport/iframe.js
@@ -67,7 +67,13 @@ IframeTransport.prototype._message = function(e) {
debug('not same origin', e.origin, this.origin);
return;
}
- var iframeMessage = JSON3.parse(e.data);
+
+ var iframeMessage;
+ try
+ {
+ iframeMessage = JSON3.parse(e.data);
+ }
+ catch (ignored) { return; }
if (iframeMessage.windowId !== this.windowId) {
debug('mismatched window id', iframeMessage.windowId, this.windowId);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list