Re:Fluin: Like a cross between IM and a Forum
by nbpoole on Wednesday January 05, 2011 @12:55AM
(#2070095)
And another:
Edit: Using a bit.ly link, since HN's URL parser is leaving out the closing ].
Re:Fluin: Like a cross between IM and a Forum
by fluin on Wednesday January 05, 2011 @01:05AM
(#2070114)
but that doesn't work?
Re:Fluin: Like a cross between IM and a Forum
by nbpoole on Wednesday January 05, 2011 @01:41AM
(#2070187)
It does. If you look closely, you'll see that HN's URL parser ignored the ] at the end of the URL. If you click on the URL and then add a ] to the end of it, your JSON will be valid and you'll see two alert boxes.
Edit: But yeah, my bad for not noticing that earlier. I've swapped it out for a bit.ly link now, so it works properly. I'm headed to sleep. :)
Re:Fluin: Like a cross between IM and a Forum
by fluin on Wednesday January 05, 2011 @02:08AM
(#2070228)
It shouldn't affect the feed though (at least it doesn't seem like it)
Re:Fluin: Like a cross between IM and a Forum
by nbpoole on Wednesday January 05, 2011 @08:52AM
(#2070924)
That isn't the goal of an XSS attack. :P
Re:Fluin: Like a cross between IM and a Forum
by fluin on Wednesday January 05, 2011 @01:47AM
(#2070199)
Thanks for your help!
Re:Fluin: Like a cross between IM and a Forum
by fluin on Wednesday January 05, 2011 @01:52AM
(#2070203)
This one is fixed :)
Re:Fluin: Like a cross between IM and a Forum
by nbpoole on Wednesday January 05, 2011 @08:50AM
(#2070915)
It actually isn't. This example won't execute on page load, but it will if someone clicks in the search box.
http://fluin.com/?search=Search%22%20onclick=alert%28documen...
Since you're using PHP, I recommend you use a function like htmlspecialchars here rather than whatever kind of filtering you're doing.
A little security flaw ;)