CodeSOD: Classic WTF: One-and-... Note

CodeSOD: Classic WTF: One-and-a-Half-Tiered Application Design

The text describes a situation involving a web application with vulnerable JavaScript code. The code, examined by Môshe, used dynamic SQL generation, creating a significant security risk. The sendLinkVal function, meant for handling delivery data, was built with concatenated SQL strings. This allowed for potential SQL injection attacks, exposing sensitive customer data. Môshe discovered this vulnerability, detailing how he was able to manipulate customer data. He reported the issue to the delivery service, leading to contact with the developer. The developer moved the queries to the .NET backend as a solution. However, the backend solution still used concatenated SQL strings. Despite the changes, the application remained susceptible to SQL injection attacks, due to a lack of parameterized queries. The text serves as a cautionary tale of bad programming practices and security flaws.