Skip to content

Commit

Permalink
Keep only sanitization functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
slubwama committed Oct 1, 2024
1 parent 66eb999 commit a12db13
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions omod/src/main/java/org/openmrs/web/servlet/QuickReportServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t

reportType = sanitizeInput(reportType);

if (!isValidReportType(reportType)) {
session.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, "error.invalidReportType");
return;
}

try {
Velocity.init();
}
Expand Down Expand Up @@ -374,9 +369,4 @@ private String sanitizeInput(String input) {
}
return input.replaceAll("[<>\"'%;()&+]", "");
}

private boolean isValidReportType(String reportType) {
return "RETURN VISIT DATE THIS WEEK".equals(reportType) || "ATTENDED CLINIC THIS WEEK".equals(reportType)
|| "VOIDED OBS".equals(reportType);
}
}

0 comments on commit a12db13

Please sign in to comment.