A production authentication helper from an anonymous submission contains a TODO and returns true for every input token. The authenticated user is recorded separately when the session begins, which limits some impersonation scenarios. It does not make the validator useful: any string passes the check. Remy Porter published the example in The Daily WTF on October 1, 2026.
An anonymous submitter showed The Daily WTF the production function used to validate authentication tokens. Its implementation contains a TODO comment and returns true, so every supplied token is accepted.
IsTokenValid
public bool IsTokenValid(string token)
{
//TODO
return true;
}
The application stores the authenticated user's identity separately when the session starts. That makes impersonating another user somewhat harder, according to the article, but the token check itself provides no authentication. Remy Porter published the item in the CodeSOD series on October 1, 2026.
Paulos Yibelo says a Vercel bug bounty uncovered a zero-day in Linux KVM that could let a virtual machine guest reach root on its host. Vercel CEO Gui…
Remy Porter revisits DJ’s first paid web project, written when he was 19. To choose a banner record, the PHP code scans every row, records the largest…
Partial Function Application lands in PHP 8.6 and finally makes the pipe operator pleasant to use. It is also easy to misread. A partial evaluates its…
PHP 8.5 ships Uri\Rfc3986\Uri and Uri\WhatWg\Url, and the obvious complaint is that one clean class would have been simpler. Kai argues the split is t…
Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.