5 ms·
PG could start using POST & CSRF protection to lock this down. Or we could just avoid doing this to each other.
by carbocation 15y ago
PG could start using POST & CSRF protection to lock this down. Or we could just avoid doing this to each other.
- daeken 15y agoCSRF protection is the right way to solve this. Switching to POST doesn't provide any real protection; an attacker can simply put up a form that autosubmits to the endpoint with POST.
- Bakkot 15y agoCSRF couldn't stop this particular attack, since it's not actually cross-site. You need to guard against both.
- daeken 15y agoI think you misunderstand what CSRF protection does. It doesn't have anything to do with same-origin security, but rather preventing request forgery attacks in general. If a CSRF token was present on requests and was tied to a user's session (as is standard), then that would absolutely defend against this attack.
- freehunter 15y agoOr we could just avoid doing this to each other. Security through obscurity?
- tryeng 15y agoNope. Security through niceness and ethics. If everyone was in on it we would have a really great society.
- dshah 15y agoI don't think anyone would contest that good behavior would be good for society. But, it's not a practical expectation, because the probability of everyone exhibiting good behavior is vanishingly small.
- freehunter 15y agoThat is exactly security through obscurity. If you're relying on people being nice enough to not exploit you (no matter how difficult it is), you have no security at all. Let's say everyone on HN was nice enough to not use exploits. Might be possible. But then one person does a drive-by exploit, and BAM. Everyone but one person is nice enough to not exploit people. Just because you wish people were nice doesn't make them nice.
- tryeng 15y agoNo, it's just lack of security. There's no obscurity involved at all. (And, if there was any doubt, we should of course not count on people being nice on the internet.)
- city41 15y ago> Or we could just avoid doing this to each other. Hacker News has grown dramatically. The "Hacker News effect" is now significant and often considered valuable. If there is an exploit that makes it possible, people will use it.