Closed jsilland closed 6 years ago
@jsilland Was wondering if you ever forked and maybe made changes to rid eval? Causing all kinds of issue on school server and we either must retire jeditable or get it fixed. Really hate to lose!
Thanks in advance.
Woody
Hello, this bug has been fixed. Stay tuned for the next version (if you're still using it!) :)
My website is making use of this plugin and we are in the process of implementing a Content Security Policy, a longstanding W3C recommendation aiming to make websites more secure.
One of the reports we have observed and that I am presently working on eliminating, is the use of Javascript's
eval
method, which essentially allows data, possibly containing user-injected content, to be treated as code: https://github.com/tuupola/jquery_jeditable/blob/dea6556ad6e578601bc432781a695a6e255618ce/jquery.jeditable.js#L490 — this is bad for a variety of reasonsIt appears to me that vulnerability could be simply addressed by replacing this statement with a call to
JSON.parse
. If you agree with this analysis, I'd be happy to send a PR to address that.