Skip to content

Instantly share code, notes, and snippets.

@cnsaturn
Created December 11, 2012 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cnsaturn/4256196 to your computer and use it in GitHub Desktop.
Save cnsaturn/4256196 to your computer and use it in GitHub Desktop.
XSS security fix for SWFUPload v2.2.x
// before
this.movieName = root.loaderInfo.parameters.movieName;
// after
this.movieName = root.loaderInfo.parameters.movieName.replace(/[^\w\.-]/g, '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment