Explain CSRF like I'm five.

Did you find this post useful? Show some love!

CSRF (Cross Site Request Forgery) is also known as Sea-Surf or Session Riding. It's is a form of trick that bad folks play on the browser in order to get it to do unexpected things in applications that you're already logged in.

For example, imagine you were logged into your Supercell game on the internet. You get an e-mail saying "Click here to get 500 gems for free!". Clicking on the text, on the contrary, will actually initiate a request to Supercell to transfer all your gems to the hacker's account. Now, along with the request, the browser always sends the cookies to Supercell as well. Supercell verifies if the cookies are valid (which they are because you just logged in!), Supercell will trust the browser and the request and doesn't know that this is not what you wanted. They will go ahead and execute this instruction thinking this is what you wanted to do.

This is a CSRF. The browser & Supercell got tricked into doing something they shouldn't have done. There are multiple ways to prevent yourself and your website from a CSRF attack but that's a conversation for when you're 10. For now, stay away from spammy links. :D

Classic DEV Post from Apr 26

What do you think of the new Go logo?

I got a hilarious message from my friend about Go's new look & logo announc...

Follow @jess to see more of their posts in your feed.
Just an other curious 🐜
More from @hemanth
Explain JWT like I'm five.
#web #javascript #explainlikeimfive #discuss
Explain Redux like I'm five
#discuss #explainlikeimfive #react
Trending on dev.to
Does your website really need to be larger than Windows 95?
#discuss #coding #technology
Web Developer Security Checklist V2
#security #aws #webdev #devops
Thoughts on Dashboard Design
#data #dashboard #dataanalysis #productivity
PHP Security: Passwords
#php #security #cryptography
Writing Beautiful Code
#webdev #productivity #php
Juggling Multiple Languages Simultaneously
If you don't hire juniors, you don't deserve seniors
#career #management #recruiting
How to Improve Your Development Experience
#beginners #career #development #productivity