memesearch
Broken Login Authentication Code

Broken Login Authentication Code

Download Find similar pictures
Text on the meme
<!-- todo: put this in a different file!!! --> function authenticate(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(); } }); </script>
What it means

A screenshot shows JavaScript login authentication code that checks user accounts and passwords, but then contains the absurd condition "true" == "true" before returning false. The joke is about obviously broken, amateurish, or insecure programming logic, making it useful as a reaction to bad code or a failed login system. EN: A screenshot shows JavaScript login authentication code that checks user accounts and passwords, but then contains the absurd condition "true" == "true" before returning false. The joke is about obviously broken, amateurish, or insecure programming logic, making it useful as a reaction to bad code or a failed login system.

Objects
Tags
Sources
Type
image
Size
373×394 · 28.2 KiB
Mood
sarcastic, absurd
Language
en
Added