Skip to content

Commit

Permalink
Add escape to error messages (#117)
Browse files Browse the repository at this point in the history
Co-authored-by: Lukas Forer <[email protected]>
  • Loading branch information
seppinho and lukfor authored Sep 6, 2023
1 parent fd1a42c commit df82d7a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import java.util.List;
import java.util.Vector;

import org.apache.commons.lang.StringEscapeUtils;

import cloudgene.sdk.internal.WorkflowContext;
import cloudgene.sdk.internal.WorkflowStep;
import genepi.hadoop.importer.ImporterFactory;
Expand Down Expand Up @@ -118,7 +120,7 @@ private boolean checkVcfFiles(WorkflowContext context) {
return false;
}
} catch (Exception e) {
context.error("Unable to parse reference panel '" + reference + "': " + e.getMessage());
context.error("Unable to parse reference panel '" + reference + "': " + StringEscapeUtils.escapeHtml(e.getMessage()));
return false;
}

Expand Down Expand Up @@ -244,7 +246,7 @@ private boolean checkVcfFiles(WorkflowContext context) {

} catch (IOException e) {

context.endTask(e.getMessage() + " (see <a href=\"/start.html#!pages/help\">Help</a>).",
context.endTask(StringEscapeUtils.escapeHtml(e.getMessage()) + " (see <a href=\"/start.html#!pages/help\">Help</a>).",
WorkflowContext.ERROR);
return false;

Expand Down

0 comments on commit df82d7a

Please sign in to comment.