From 583d95af8f722f60cf848e603f12f6c0be0e9a59 Mon Sep 17 00:00:00 2001 From: kstranacher Date: Fri, 10 Feb 2012 16:21:09 +0000 Subject: * Ausbau MOASecurityManager (nicht anwendbar da SecurityManager nur systemweit gesetzt werden kann) * Update ExternalURIResolver mit ExternalURIVerifier der gegen Blackliste checkt git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1238 d688527b-c9ab-4aba-bd8d-4036d912da1d --- common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java | 2 +- .../src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'common/src/main') diff --git a/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java index 58a07f5e6..7effe8b4f 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java @@ -44,7 +44,7 @@ public class FileUtils { * @return file content * @throws IOException on any exception thrown */ - public static byte[] readURL(String urlString) throws IOException { + public static byte[] readURL(String urlString) throws IOException { URL url = new URL(urlString); InputStream in = new BufferedInputStream(url.openStream()); byte[] content = StreamUtils.readStream(in); diff --git a/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java b/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java index ae83a551d..0401108d5 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java @@ -91,9 +91,13 @@ public class MOAEntityResolver implements EntityResolver { try { URI uri = new URI(systemId); systemId = uri.getPath(); + System.out.println("MOAEntityResover: " + uri); if (!"file".equals(uri.getScheme()) || "".equals(systemId.trim())) { return null; } + + //ExternalURIVerifier.verify(uri.getHost(), uri.getPort()); + } catch (MalformedURIException e) { return null; } -- cgit v1.2.3