rspec/rules/S2574/rule-except-see.adoc

18 lines
410 B
Plaintext
Raw Permalink Normal View History

Using unvalidated values can expose an application to injection attacks.
=== Noncompliant code example
2022-02-04 17:28:24 +01:00
[source,text]
----
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
// ...
Employee employee = new Employee();
employee.setFirstName(request.getParameter("firstName")); // Noncompliant
// ...
save(employee); // Uh-oh!
----