Skip to content
Merged
Show file tree
Hide file tree
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 @@ -271,6 +271,8 @@ private static Document readXMLString(String xmlString) throws ParserConfigurati
SAXException, IOException, IllegalArgumentException {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
builderFactory.setNamespaceAware(true);
builderFactory.setXIncludeAware(false);
builderFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
// Uncomment to turn on schema validation
// builderFactory.setValidating(true);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ public GetMapStyleParams(RequestParams params, WmsCatalogue catalogue) throws Ed
URL url;
try {
url = new URL(xmlLoc);
String protocol = url.getProtocol();
if (!protocol.startsWith("http")) {
throw new EdalException(
"Reading SLD using protocol " + protocol + " is not supported");
}
InputStream is = url.openStream();
StringWriter writer = new StringWriter();
IOUtils.copy(is, writer);
Expand Down
Loading