SQL Injection Countermeasures Using Slick in Playframework 2

Asked 1 years ago, Updated 1 years ago, 88 views

Currently, I am trying to list the words entered from the form that match the title.

defindByWord(word:String): Future [Seq[Item]]=db.run{
  Query.filter(row=>(row.title like "%" + word+"%").result
}

This is how the variables are incorporated.
Are SQL injection countermeasures in place?

sql scala playframework slick

2022-09-30 21:26

1 Answers

I can't check the operation at hand, but it shouldn't have been done.
I think the "%"+word+"%" part had to be written as "%"+word+"%".bind.


2022-09-30 21:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.