CS FundamentalsHardGATE CS · product-company placement
A bank's session cookie is set with SameSite=Lax. While logged in, the user visits evil.example, which (1) auto-submits a hidden POST form to the bank, (2) shows a link to the bank that the user clicks, and (3) loads an image from a bank URL. In which cases does the browser send the cookie?
- A. Only (2), the top-level GET navigation
- B. (1) and (2), because both are navigations
- C. (2) and (3), because both are GET requests
- D. All three, because the cookie belongs to the bank
Correct answer: A. Only (2), the top-level GET navigation
Lax sends the cookie on cross-site requests only for top-level navigations with a safe method such as GET. A cross-site POST (the classic CSRF vector) and a cross-site sub-resource like an image are sent without it.
More Computer Networks questions
- A router has four equal-cost paths to a destination and uses ECMP. Why does it usually choose the path by hashing each packet's 5-tuple…
- An IPv6 packet has Payload Length = 1240 and carries one 8-byte Fragment extension header before the upper-layer data. What is the total…
- Match each IPv6 address with its type. P. ff02::1 Q. fe80::1 R. fd12:3456::1 S. ::1 1. Loopback 2. Link-local unicast 3. All-nodes…
- Three PCs behind one NAT router ping the same public server at the same time. ICMP Echo messages have no port numbers. How does the NAT…
- An 802.1Q trunk is configured with native VLAN 1 on switch A but native VLAN 99 on switch B. What happens to an untagged frame that A…
- Why does 802.11 use collision avoidance with ACKs rather than the collision detection used by classic Ethernet?