Fix security issue by avoiding use of eval() within postMessage calls between embedAPI and main editor (also namespace the messages and protect the imagelib extension message listener from non-string messages); avoid embedAPI's unneeded randomizing of callback IDs in favor of incrementing; deprecate old embedded_svg_edit API name in favor of JS/JSLint-friendly EmbeddedSVGEdit name (and allow it to be instantiated w/o new keyword); JSLint/HTML5-ize embedAPI files, remove HTML5/browser-optional type="text/javascript", remove unused comments for embedAPI
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2585 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -64,7 +64,7 @@ svgEditor.addExtension("imagelib", function() {
|
||||
// Receive postMessage data
|
||||
var response = evt.data;
|
||||
|
||||
if(!response) {
|
||||
if(!response || typeof response !== "string") { // Todo: Should namespace postMessage API for this extension and filter out here
|
||||
// Do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user