Skip to content

Commit ba30500

Browse files
committed
CLOUDSTACK-505: Added string cleaning to the start and end debug
log statements within the API servlet.
1 parent 44da7b1 commit ba30500

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

server/src/com/cloud/api/ApiServlet.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.cloud.user.Account;
3737
import com.cloud.user.AccountService;
3838
import com.cloud.user.UserContext;
39+
import com.cloud.utils.StringUtils;
3940
import com.cloud.utils.component.ComponentLocator;
4041
import com.cloud.utils.exception.CloudRuntimeException;
4142

@@ -126,7 +127,7 @@ private void processRequest(HttpServletRequest req, HttpServletResponse resp) {
126127
String reqStr = "";
127128
if (s_logger.isDebugEnabled()) {
128129
reqStr = auditTrailSb.toString() + " " + req.getQueryString();
129-
s_logger.debug("===START=== " + reqStr);
130+
s_logger.debug("===START=== " + StringUtils.cleanString(reqStr));
130131
}
131132

132133
try {
@@ -343,7 +344,7 @@ private void processRequest(HttpServletRequest req, HttpServletResponse resp) {
343344
} finally {
344345
s_accessLogger.info(auditTrailSb.toString());
345346
if (s_logger.isDebugEnabled()) {
346-
s_logger.debug("===END=== " + reqStr);
347+
s_logger.debug("===END=== " + StringUtils.cleanString(reqStr));
347348
}
348349
// cleanup user context to prevent from being peeked in other request context
349350
UserContext.unregisterContext();

0 commit comments

Comments
 (0)