Javascript: Safely upload a client data file
Posted
by
Jeffrey Sweeney
on Programmers
See other posts from Programmers
or by Jeffrey Sweeney
Published on 2012-05-31T12:13:37Z
Indexed on
2012/05/31
16:50 UTC
Read the original article
Hit count: 406
I'm (still) working on a template-based XML editing program. It's a GUI-based XML editor that only allows users to add certain tags and attributes based off the requirements. You can see the current version here for an idea.
Now, I'd like to allow users to upload their own data templates, but I'm concerned about potential XSS hacks. Currently, the template file is in Javascript object literal notation, which unsurprisingly is a security nightmare if the user can upload their own. I was thinking of using XML instead, but is there an even better alternative?
© Programmers or respective owner