Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

false negative writing to response.outputStream #31

Open
albfernandez opened this issue Oct 10, 2017 · 0 comments
Open

false negative writing to response.outputStream #31

albfernandez opened this issue Oct 10, 2017 · 0 comments
Assignees

Comments

@albfernandez
Copy link
Owner

albfernandez commented Oct 10, 2017

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String badParam = request.getParameter("param");
		Writer out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), StandardCharsets.UTF_8));
               // Should fire rule violation in next line
		out.write(" <input type='hidden' name='test' value='" + badParam + "' />\n");
		out.close();
	}

It works using PrintWriter but fails using Writer

@albfernandez albfernandez self-assigned this Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant