Skip to content

Instantly share code, notes, and snippets.

View shivam1283's full-sized avatar
🎯
Focusing

Shivam Yadav shivam1283

🎯
Focusing
View GitHub Profile
@shivam1283
shivam1283 / ConceptsToCover.md
Last active December 15, 2022 06:44
React Concepts
@shivam1283
shivam1283 / HTTP2.0.md
Created June 5, 2022 17:44
Networking

Traditional HTTP requests flow throught the network "pipe" (TCP connection) and the pipe only allows requests to flow in 1 direction ("to" or "from") and only 1 request can be be sent through the at once (Single-plexing).
Image

HTTP 1.1 allows browser to form 6 such TCP connections to the server. This approach was quite expensive as servers held resource descritptors which eats a lot of server memory. Image

HTTP2 enabled multiplexing thought the same network pipe. The pipe has different streams and each stream carriers an ID which lets client map the responses to its respective client.

HTTP2

@shivam1283
shivam1283 / csrf.md
Last active December 26, 2022 06:10
security.md

Cross-site request forgery (also known as CSRF) is a web security vulnerability that allows an attacker to induce users to perform actions that they do not intend to perform. In a successful CSRF attack, the attacker causes the victim user to carry out an action unintentionally.

For a CSRF attack to be possible, three key conditions must be in place:

  1. A relevant action. There is an action within the application that the attacker has a reason to induce. This might be a privileged action (such as modifying permissions for other users) or any action on user-specific data (such as changing the user's own password).
  2. Cookie-based session handling. Performing the action involves issuing one or more HTTP requests, and the application relies solely on session cookies to identify the user who has made the requests. There is no other mechanism in place for tracking sessions or validating user requests.
  3. No unpredictable request parameters. The requests that perform the action do not contain an

Array wrapper

drag and drop to upload