rspec/rules/S2598/java/rule.adoc

36 lines
837 B
Plaintext
Raw Normal View History

== Why is this an issue?
2020-06-30 12:48:07 +02:00
include::../description.adoc[]
=== Noncompliant code example
2020-06-30 12:48:07 +02:00
2022-02-04 17:28:24 +01:00
[source,java]
2020-06-30 12:48:07 +02:00
----
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
if (ServletFileUpload.isMultipartContent(request)) {
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory); // Noncompliant
// ...
----
include::../see.adoc[]
* https://wiki.sei.cmu.edu/confluence/display/java/IDS56-J.+Prevent+arbitrary+file+upload[CERT, IDS56-J.] - Prevent arbitrary file upload
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]