SQL Injection (ARCH8100)
هذا المحتوى غير متوفر بلغتك بعد.
Key kotlin.security.sql-injection · Severity error · Category security · CWE CWE-89
Flags SQL execution APIs called with a query built from string templates or concatenation.
Incorrect
Section titled “Incorrect”statement.executeQuery("SELECT * FROM users WHERE id = $id")Correct
Section titled “Correct”val ps = connection.prepareStatement("SELECT * FROM users WHERE id = ?")ps.setInt(1, id)Use prepared statements with bound parameters.