4

OWASP tool gives warning of sql injection while writing raw sql query in Room migration. Is there any solution to overcome for this problem. Below is my code:

class Migration1to2 : Migration(1, 2) {
override fun migrate(database: SupportSQLiteDatabase) {

    database.execSQL("ALTER TABLE Book ADD COLUMN pub_year INTEGER")
}
}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.