Skip to content

Commit

Permalink
WIP 344 Intermediate workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Sep 16, 2024
1 parent f9d8305 commit b46f575
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ public static boolean isLocalResource(String link) {
throw new InvalidUriSyntaxException(e);
}

if (null == aUri.getPath()) {
log.warn("'{}' does not have a valid (URI) path", link);
return false;
}

return (
(isLinkToFile(aUri)) // (1)
||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class WebSpec extends Specification {
false | "10.0.0.1/index.html" // this is a valid REMOTE address, defaults to http or https

false | "javascript:dummy"
false | "xmxaxixlxtxo:[email protected]"
}

@Unroll
Expand All @@ -116,7 +117,7 @@ class WebSpec extends Specification {
Web.isLocalResource(invalidUri)

then:
thrown(Web.InvalidUriSyntaxException)
thrown(InvalidUriSyntaxException)

where:
invalidUri << [
Expand Down

0 comments on commit b46f575

Please sign in to comment.