Skip to content

Commit

Permalink
Flash: Restrict scripting abillity to swf's own domain only.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayarjo committed Apr 10, 2012
1 parent e020363 commit 1fc3a50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/flash/plupload/src/com/plupload/Plupload.as
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ package com.plupload {
private function init(e:Event = null):void {
removeEventListener(Event.ADDED_TO_STAGE, init);

// Allow upload cross domain upload
Security.allowDomain("*");
// Allow upload cross domain access
// Security.allowDomain("*");

// Setup id
this.id = this.stage.loaderInfo.parameters["id"];
Expand Down
9 changes: 7 additions & 2 deletions src/javascript/plupload.flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,15 @@
});

// Wait for Flash to send init event
uploader.bind("Flash:Init", function() {
uploader.bind("Flash:Init", function() {
var lookup = {}, i;

getFlashObj().setFileFilters(uploader.settings.filters, uploader.settings.multi_selection);
try {
getFlashObj().setFileFilters(uploader.settings.filters, uploader.settings.multi_selection);
} catch (ex) {
callback({success : false});
return;
}

// Prevent eventual reinitialization of the instance
if (initialized[uploader.id]) {
Expand Down

0 comments on commit 1fc3a50

Please sign in to comment.