Skip to content

Commit

Permalink
Fixed vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
hankenstein2 committed Jun 27, 2024
1 parent b44be65 commit 40a0551
Showing 1 changed file with 37 additions and 7 deletions.
44 changes: 37 additions & 7 deletions java/edu/ucar/metviewer/MVServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -1326,12 +1326,19 @@ else if (nodeCall.tag.equalsIgnoreCase("db_con")) {

// <list_val>
else if (nodeCall.tag.equalsIgnoreCase("list_val")) {
strResp.append(handleListVal(nodeCall, requestBody.toString(), currentDbName));
try {
strResp.append(handleListVal(nodeCall, requestBody.toString(), currentDbName));
} catch (ValidationException e) {
logger.info(e.getMessage());
}

// <list_stat>
else if (nodeCall.tag.equalsIgnoreCase("list_stat")) {
strResp.append(handleListStat(nodeCall, requestBody.toString(), currentDbName));
try {
strResp.append(handleListStat(nodeCall, requestBody.toString(), currentDbName));
} catch (ParserConfigurationException e) {
logger.error( e.getMessage());
}
}
// <list_val_clear_cache>
try {
Expand All @@ -1340,30 +1347,48 @@ else if (nodeCall.tag.equalsIgnoreCase("list_stat")) {
logger.info(e.getMessage());
}
else if (isClearCache) {

try {
strResp.append(handleClearListValCache());
} catch (ParserConfigurationException e) {
logger.error( e.getMessage());
}
}

// <list_val_cache_keys>
else if (nodeCall.tag.equalsIgnoreCase("list_val_cache_keys")) {

try {
strResp.append(handleListValCacheKeys());
} catch (ParserConfigurationException e) {
logger.error( e.getMessage());
}
}

// <list_stat_clear_cache>
else if (nodeCall.tag.equalsIgnoreCase("list_stat_clear_cache")) {

try {
strResp.append(handleClearListStatCache());
} catch (ParserConfigurationException e) {
logger.error( e.getMessage());
}
}

// <list_stat_cache_keys>
else if (nodeCall.tag.equalsIgnoreCase("list_stat_cache_keys")) {
try {
strResp.append(handleListStatCacheKeys());
} catch (ParserConfigurationException e) {
logger.error( e.getMessage());
}
}

// <plot>
else if (nodeCall.tag.equalsIgnoreCase("plot")) {
try {
strResp.append(handlePlot(requestBody.toString(), currentDbName));
} catch (ParserConfigurationException | DatabaseException | ValidationException | IOException | SAXException e) {
logger.error( e.getMessage());
}

}


Expand All @@ -1382,7 +1407,11 @@ else if (nodeCall.tag.equalsIgnoreCase("xml_upload")) {

} else if (nodeCall.tag.equalsIgnoreCase("history")) {
String isShowAll = nodeCall.children[0].value;
strResp.append(getAvailableResults(isShowAll));
try {
strResp.append(getAvailableResults(isShowAll));
} catch (ParserConfigurationException e) {
logger.error( e.getMessage());
}

}

Expand All @@ -1405,7 +1434,8 @@ else if (nodeCall.tag.equalsIgnoreCase("xml_upload")) {
response.setContentType("application/xml;charset=UTF-8");
try (PrintWriter printWriter = response.getWriter()) {
printWriter.append(strResp);
}
} catch (IOException e) {
logger.info( e.getMessage());
}


Expand Down

0 comments on commit 40a0551

Please sign in to comment.