SShortSingh.
Back to feed

Why Your Session Cookie Acts Like a Password After You Log In

0
·62 views

Once a user logs in, most web applications stop using the password for subsequent requests and instead rely on a session identifier stored in a browser cookie. The server creates a session after verifying credentials, assigns it a unique ID, and uses that ID to recognize the user on every future request. Because the browser sends only the session ID — not the password — an attacker who obtains that identifier can potentially impersonate the user without ever knowing their password. This makes session IDs function as temporary credentials, and their theft can lead to full account compromise. Developers are advised to generate session IDs using cryptographically secure methods and to understand key cookie security settings to reduce this risk.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Splitting LLM prefill and decode adds a KV cache transfer cost that can erode gains

Separating prefill and decode onto different GPU pools removes compute stalls, but the design also has to move the KV cache between them. For a 32-layer model with 8 KV heads, each token adds about 64 KB of cache, so an 8,000-token prompt produces roughly 512 MB that must cross the network before decoding begins. On a 10 Gb/s link this transfer takes about 410 ms, longer than the 320 ms prefill it was meant to offload, while 25 Gb/s roughly halves the benefit and 100 Gb/s clearly wins. The author argues that cache size and interconnect bandwidth should be calculated before choosing disaggregation, and that grouped-query attention and KV cache compression can substantially reduce the transfer cost.

0
ProgrammingDEV Community ·

Python Functions Tutorial: Return Values, Redefinition and Why They Matter

This DEV Community installment continues a Python series on functions, focusing on the return statement that passes a result from a function back to the calling code. It gives an example in which a call to an add function with 10 and 20 yields a result. The article notes that several functions can be defined in one file and any defined function can be called. It also explains that a function must be defined before being called during normal execution, and that redefining a name replaces the earlier version. The piece concludes that functions help break large programs into smaller, reusable, and more maintainable tasks.

0
ProgrammingDEV Community ·

Per-Tenant DNS Records Favored Over Wildcards for Customer Storefront Domains

The article argues that customer-owned storefront domains should get explicit per-tenant DNS records rather than relying on wildcards in the SaaS operator's zone. A wildcard under the operator's domain cannot verify ownership of a customer's domain, while per-tenant records give onboarding services concrete state to read back and reconcile. The author treats domain onboarding as a consistency problem, separating desired state, observed DNS state, and ownership verification, plus delivery evidence for SPF, DKIM and DMARC. The piece lists three design risks: false readiness, reconciliation drift, and ownership boundary mistakes. It also notes that these are design considerations rather than reports of any provider incident.

0
ProgrammingDEV Community ·

Unicode Symbols in Usernames and Bios: A Developer's Practical Guide

Decorative symbols like hearts, stars and kaomoji are ordinary Unicode characters, which is why copying them works across apps. Whether they display depends on the font support of each device, so the same symbol can appear as an empty box on another screen. Platforms differ: Discord, Instagram, Roblox and X allow permissive display names but enforce strict usernames. The guide advises developers to count grapheme clusters rather than raw string length, normalize text before comparison, validate with Unicode property escapes, and use utf8mb4 in databases.