4 ms·
So how does this work? Does hnbutton.appspot.com do some clever proxying, or something? Or does HN just have a very easily exploitable XSRF vulnerability?
by TazeTSchnitzel 14y ago
So how does this work? Does hnbutton.appspot.com do some clever proxying, or something? Or does HN just have a very easily exploitable XSRF vulnerability?
- alter8 14y agoThey use the search API. https://github.com/igrigorik/hackernews-button/blob/master/hnbutton/hnbutton.go#L76 https://github.com/igrigorik/hackernews-button/blob/master/h...
- mixedbit 14y agoI also don't understand how it works. If you could up-vote just by following a link, you could easily gain a system. For example, you could submit a story that automatically up-votes itself when visited by logged-in user, without any button press (CSRF). I believe Facebook like button (and other similar gadgets) are iframes from Facebook. So Facebook controls how the button looks like and it is not possible to submit 'Like' requests from a third party domain.
- nightpool 14y agohttp://news.ycombinator.com/item?id=3742902 http://news.ycombinator.com/item?id=3742902 EDIT: This is a submission from a while ago that does, in fact, upvote itself.
- deleted 14y ago[deleted]
- cxhristian 14y agoFrom what I can understand, looking at one site that uses the button[0], it just displays current votes and links you to the submission. It doesn't do any voting from the site like a reddit button would do. [0] https://bountify.co/blog/host-your-own-hacker-news-button-server https://bountify.co/blog/host-your-own-hacker-news-button-se...
- alter8 14y agoMy answer to GP looks silly now. I see what he meant. The submission title should change to vote-counter button to avoid the confusion.