-
Notifications
You must be signed in to change notification settings - Fork 49
Add contact feedback form with security flows and CAPTCHA (Kaptcha, CVE-2019-16335) #72
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
Conversation
| session.setAttribute("contactFeedbackCaptcha", capText); | ||
| BufferedImage bi = kaptchaProducer.createImage(capText); | ||
| response.setContentType("image/png"); | ||
| ImageIO.write(bi, "png", response.getOutputStream()); |
Check notice
Code scanning / SonarQube
Exceptions should not be thrown from servlet methods
| session.setAttribute("contactFeedbackCaptcha", capText); | ||
| BufferedImage bi = kaptchaProducer.createImage(capText); | ||
| response.setContentType("image/png"); | ||
| ImageIO.write(bi, "png", response.getOutputStream()); |
Check notice
Code scanning / SonarQube
Exceptions should not be thrown from servlet methods
| String captcha = request.getParameter("captcha"); | ||
| String captchaExpected = (String) request.getSession().getAttribute("contactFeedbackCaptcha"); | ||
| response.setContentType("text/html"); | ||
| PrintWriter out = response.getWriter(); |
Check notice
Code scanning / SonarQube
Exceptions should not be thrown from servlet methods
| String email = request.getParameter("email"); | ||
| String category = request.getParameter("category"); | ||
| response.setContentType("text/html"); | ||
| PrintWriter out = response.getWriter(); |
Check notice
Code scanning / SonarQube
Exceptions should not be thrown from servlet methods
| session.setAttribute("contactFeedbackCaptcha", capText); | ||
| BufferedImage bi = kaptchaProducer.createImage(capText); | ||
| response.setContentType("image/png"); | ||
| ImageIO.write(bi, "png", response.getOutputStream()); |
Check notice
Code scanning / SonarQube
Exceptions should not be thrown from servlet methods Low
| session.setAttribute("contactFeedbackCaptcha", capText); | ||
| BufferedImage bi = kaptchaProducer.createImage(capText); | ||
| response.setContentType("image/png"); | ||
| ImageIO.write(bi, "png", response.getOutputStream()); |
Check notice
Code scanning / SonarQube
Exceptions should not be thrown from servlet methods Low
|




This PR adds a new contact feedback form use case to the Java security demo project, including various security flows and optional CAPTCHA validation using the Kaptcha library (CVE-2019-16335). The implementation demonstrates how static analysis can help find vulnerabilities in basic web flows, including insecure input handling and CAPTCHA integration.