- On a cmd nevigate to 'hw4-frontEnd/hw4-V1-NotSafe'
- Run 'npm install'
- Run 'npm run dev'
- On your browser go to 'http://localhost:3000/'
- Register to the app and post a draft
- Go to the devtools and from Cookies copy the token under 'FrontEndToken'
- Open powershell and run this: curl -X POST \ -H "cookie: FrontEndToken=<The_Token_You_Coppied>" http://localhost:3000/drafts
- Expected result- a page with the informtaion of your drafts page is returned- Hacked!
- On a cmd nevigate to 'hw4-frontEnd/hw4-V2-Safe'
- Run 'npm install'
- Run 'npm run dev'
- Open powershell and run this: curl -X POST \ -H "cookie: FrontEndToken=<The_Token_You_Coppied>" http://localhost:3000/drafts
- Expected result- the page with the drafts will not be returned- Hack prevented