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

Fix code scanning alert no. 77: Log Injection #106

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ public List<Tuple> dataTypes(boolean stringForMissing) throws IOException, DataT
continue;
}
if (stringForMissing) {
log.warn("Could not find datatype for field " + rec.id + ". Will use 'keyword'");
String sanitizedId = rec.id.replace("\n", "").replace("\r", "");
log.warn("Could not find datatype for field " + sanitizedId + ". Will use 'keyword'");
dtInfo.add(new Tuple(rec.id, "keyword"));
} else {
log.error("Could not find datatype for field " + rec.id);
String sanitizedId = rec.id.replace("\n", "").replace("\r", "");
log.error("Could not find datatype for field " + sanitizedId);
missing = true;
}
}
Expand Down