How to Prevent SQL Injection Attacks in Node.js

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 9

  • @marcionitao3029
    @marcionitao3029 2 роки тому +2

    Hey man, you are amazing, thanks for the excellent explanation, everything seems to be so easy. What theme are you using?

  • @toshitsingh7270
    @toshitsingh7270 2 роки тому

    Thanks for this detailed video, appreciate it 👍

  • @shadmanfatin777
    @shadmanfatin777 Рік тому +1

    Sir, I have a question. Can you please answer? Here you have talked about 3 techniques to prevent sql injections. But if we use only the placeholders using the '?' sign, then do we need to apply the other 2 techniques? Isn't using placeholders enough to prevent sql injections?

    • @j1000a
      @j1000a 3 місяці тому

      Using a placeholder merely ensures that the input is treated as a string and not extra SQL. But you're still giving the user way too much control. What if the input is treated as a username?
      SELECT * FROM USER WHERE USERNAME = 'JOHNDOE'
      could easily be changed to
      SELECT * FROM USER WHERE USERNAME = 'JANEROE'
      or even
      SELECT * FROM USER WHERE USERNAME = 'ADMINISTRATOR'
      So a placeholder might be sufficient in some cases, but it heavily depends on your situation.
      Using it in combination with his other techniques makes for a better checklist of things one should always do.

    • @shadmanfatin777
      @shadmanfatin777 3 місяці тому

      ​​@@j1000a didnt understand ur example. Using placeholders seems 100% secure.

    • @habibosaye
      @habibosaye 6 годин тому

      @@shadmanfatin777 Godspeed to yourself/your employer 💀

    • @shadmanfatin777
      @shadmanfatin777 6 годин тому

      ​@@habibosaye wdym?

  • @karthikeyasoft
    @karthikeyasoft Рік тому

    if use ? right, at the time we need to use only one params right , if we need to check more than one it will execute or what.

  • @jorgedavalos5663
    @jorgedavalos5663 2 роки тому

    wheres the linked video?