Skip to content

Commit

Permalink
added logs for debugging sanitization changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kreloaded committed Aug 31, 2023
1 parent d93d616 commit 6fe53b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class CreateSalesforceNote implements CreateNoteInterface {
public CreateNoteFormatterDto createNote(SalesforceUser user, String accountId, NoteDto note) {
String salesforceUserId = user.getExternalUserId();

logger.info("createNote note text: ", note.getText());
String noteTitle = getNoteTitleFromContent(note);
String encodedNoteContent = base64Helper.base64Encode(note.getText());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Custom request wrapper to sanitize the request body
*/
public class SanitizedRequestWrapper extends HttpServletRequestWrapper {

Logger logger = LoggerFactory.getLogger(SanitizedRequestWrapper.class);

private final String sanitizedBody;

private Map<String, List<String>> sanitizedParams;
Expand All @@ -29,6 +33,7 @@ public class SanitizedRequestWrapper extends HttpServletRequestWrapper {

public SanitizedRequestWrapper(HttpServletRequest request, String sanitizedBody) {
super(request);
logger.info("SanitizedRequestWrapper sanitizedBody: ", sanitizedBody);
this.sanitizedBody = sanitizedBody;
this.sanitizedParams = new HashMap<>();
this.sanitizedHeaders = new HashMap<>();
Expand Down

0 comments on commit 6fe53b7

Please sign in to comment.