1
1 Comment

Learn what SQL injection is and how to defend against it

Hey IH, here is a blog post on how to defend and understand what SQLinjection is.

Let me know what you think and what would you change or add.

submitted this link on February 13, 2023
  1. 1

    Article is good, but I would phrase this a bit differently.

    To avoid SQL injection attacks, keep the data separate from SQL. So that data stays as data and is not read as commands by the SQL parser:

    • If the code needs a number, change it to a number explicitly
    • If it's a string, use bind parameters
    • If it's an enum, double-check that the value is strictly from the enum
Trending on Indie Hackers
Your AI Product Is Not A Real Business User Avatar 119 comments Stop Building Features: Why 80% of Your Roadmap is a Waste of Time User Avatar 83 comments I built an enterprise AI chatbot platform solo — 6 microservices, 7 channels, and Claude Code as my co-developer User Avatar 44 comments The Clarity Trap: Why “Pretty” Pages Kill Profits (And What To Do Instead) User Avatar 37 comments I got let go, spent 18 months building a productivity app, and now I'm taking it to Kickstarter User Avatar 23 comments How to build a quick and dirty prototype to validate your idea User Avatar 22 comments