Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b622e2a commit 9de2be8Copy full SHA for 9de2be8
1 file changed
java/ql/src/Security/CWE/CWE-036/OpenStream.java
@@ -1,8 +1,8 @@
1
public class TestServlet extends HttpServlet {
2
- protected void doGet(HttpServletRequest request, HttpServletResponse response)
3
- throws ServletException, IOException {
4
- // BAD: a URL from a remote source is opened with URL#openStream()
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ // BAD: a URL from a remote source is opened with URL#openStream()
5
URL url = new URL(request.getParameter("url"));
6
InputStream inputStream = new URL(url).openStream();
7
- }
+ }
8
}
0 commit comments