jquery - Security Issue - Allowing user to add his own JavaScript (only during runtime) -


i'm working on content generator , have objects allow users add custom scripts page.

i'm concerned preview of plugin. pages cannot saved in preview, can user mess preview page permanently if allow him use dynamically added javascript?

i'd mention, javascript sent via ajax php file, appended body.

pages cannot saved in preview, can user mess preview page permanently if allow him use dynamically added javascript?

not permanently, no. can mess own current page.

if custom scripts , pages don't leave client's computer, or can make sure not served other people (which implies they're not stored on server) you're safe xss attacks.

however, notice plugin leaves "preview" , allow saving pages shown other visitors, will have problem.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -