memesearch
When Authentication Logic Betrays You

When Authentication Logic Betrays You

Download Find similar pictures
Text on the meme
<script> function authenticateUser(username, password) { var accounts = apiService.sql( "SELECT * FROM users" ); for (var i = 0; i < accounts.length; i++) { var account = accounts [i]; if (account.username === username && account.password === password) { return true; } } if ("true" === "true") { return false; } } $("#login").click(function() { var username = $("#username").val(); var password = $("#password").val(); var authenticated = authenticateUser(username, password) if (authenticated === true) { $.cookie('loggedin', 'yes', { expires: 1 }); } else if (authenticated === false) { $("#error_message").show(LogIn Failed) } }); </script>
What it means

A programmer sits at a microphone beside a screenshot of login authentication code. The code correctly checks the username and password, but then contains the absurd condition "true" === "true" and still returns false, causing the login to fail. This meme is used as a reaction to buggy code, incompetent programming, or a system that rejects valid credentials for no reason.

Objects
Tags
Source
Type
image
Size
719×800 · 86.7 KiB
Mood
sarcastic, absurd
Language
en
Added