mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:35:50 +00:00
Update Owner.java
Signed-off-by: AulaEmpresaLKS <129507941+AulaEmpresaLKS@users.noreply.github.com>
This commit is contained in:
parent
e90e323130
commit
473c3a694e
1 changed files with 0 additions and 15 deletions
|
@ -138,19 +138,4 @@ public class Owner extends Person {
|
|||
.append("telephone", this.telephone)
|
||||
.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Método dummy para forzar que SonarQube detecte la siguiente ISSUE:
|
||||
* "Change this code to not construct SQL queries directly from user-controlled data".
|
||||
*
|
||||
* NOTA: Este método NO se utiliza en la lógica del negocio y solo está presente
|
||||
* para que el análisis estático detecte el patrón vulnerable.
|
||||
*
|
||||
* @param userInput entrada controlada por el usuario
|
||||
* @return Consulta SQL construida de forma insegura
|
||||
*/
|
||||
public String buildVulnerableQuery(String userInput) {
|
||||
String vulnerableQuery = "SELECT * FROM Users WHERE email = '" + userInput + "'";
|
||||
return vulnerableQuery;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue