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

Cross-Site Scripting: Reflected #141

Open
QiAnXinCodeSafe opened this issue Jul 21, 2021 · 0 comments
Open

Cross-Site Scripting: Reflected #141

QiAnXinCodeSafe opened this issue Jul 21, 2021 · 0 comments

Comments

@QiAnXinCodeSafe
Copy link

QiAnXinCodeSafe commented Jul 21, 2021

protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws IOException {
final String actionName = req.getParameter("action");
if (Strings.isNullOrEmpty(actionName)) {
resp.setStatus(HttpServletResponse.SC_OK);
resp.getWriter().println("need provide action param");
return;
}
final MetaManagementAction action = actions.getAction(actionName);
if (action == null) {
resp.setStatus(HttpServletResponse.SC_OK);
resp.getWriter().println("不支持的 action: " + actionName);
return;
}

Sending unvalidated data to a web browser can result in the browser executing malicious code.

In line 40,‘actionName’ was Contaminated,It could affect line 50

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