Advertisement
arxeiss

Prepared statement

May 9th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.21 KB | None | 0 0
  1. login := "admin"
  2. password := "' OR login = 'admin"
  3.  
  4. stmt, err := db.Prepare("SELECT * FROM users WHERE login = ? AND password = ?")
  5. if err != nil {
  6.     log.Fatal(err)
  7. }
  8. res, err := stmt.Exec(login, password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement