Skip to content

Commit

Permalink
PathResource: Suppress CodeQL false positive error about path injection
Browse files Browse the repository at this point in the history
Trying "// lgtm" annotation as per
https://help.semmle.com/lgtm-enterprise/user/help/alert-suppression.html

Signed-off-by: Christian Kohlschütter <[email protected]>
  • Loading branch information
kohlschuetter committed Jan 8, 2023
1 parent ac1592e commit 8232d99
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ public static boolean isSameName(Path pathA, Path pathB)
this(uri, false);
}

@SuppressWarnings("lgtm[java/path-injection]")
PathResource(URI uri, boolean bypassAllowedSchemeCheck)
{
this(Path.of(URIUtil.correctResourceURI(uri)), uri, bypassAllowedSchemeCheck);
this(Path.of(URIUtil.correctResourceURI(uri)), uri, bypassAllowedSchemeCheck); //lgtm [java/path-injection]
}

PathResource(Path path)
Expand Down

0 comments on commit 8232d99

Please sign in to comment.