aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2017-03-16 13:13:10 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2017-03-16 13:13:10 +0100
commit3a80aa7e900c77da7625886f72ee22666ecfae23 (patch)
tree5eef5ac02252c1f493908e34c773751987b257b1 /id/server/moa-id-commons/src/main
parent226db2c5c41c149256459bf18dff4585a07e5ea1 (diff)
parentd69ba86f0855097e46e525794075f3c743e7facb (diff)
downloadmoa-id-spss-3a80aa7e900c77da7625886f72ee22666ecfae23.tar.gz
moa-id-spss-3a80aa7e900c77da7625886f72ee22666ecfae23.tar.bz2
moa-id-spss-3a80aa7e900c77da7625886f72ee22666ecfae23.zip
Merge branch 'Branch_MOA-ID-3.2.1' into development_preview
# Conflicts: # id/server/moa-id-commons/pom.xml # pom.xml
Diffstat (limited to 'id/server/moa-id-commons/src/main')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java2
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java14
2 files changed, 12 insertions, 4 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java
index d2c827d55..fcf4c3ffa 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java
@@ -32,7 +32,7 @@ public interface AuthConfiguration extends ConfigurationProvider{
* Get a configuration value from basic file based MOA-ID configuration
*
* @param key configuration key
- * @return configuration value
+ * @return configuration value or null if it is not found
*/
public String getBasicMOAIDConfiguration(final String key);
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
index fed968443..62a168ac8 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
@@ -28,6 +28,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -542,6 +543,7 @@ public class DOMUtils {
/**
* A convenience method to parse an XML document non validating.
+ * This method disallow DocType declarations
*
* @param inputStream The <code>InputStream</code> containing the XML
* document.
@@ -552,10 +554,16 @@ public class DOMUtils {
* parser.
*/
public static Element parseXmlNonValidating(InputStream inputStream)
- throws ParserConfigurationException, SAXException, IOException {
+ throws ParserConfigurationException, SAXException, IOException {
return DOMUtils
- .parseDocument(inputStream, false, Constants.ALL_SCHEMA_LOCATIONS, null, null)
- .getDocumentElement();
+ .parseDocument(inputStream, false, Constants.ALL_SCHEMA_LOCATIONS, null,
+ Collections.unmodifiableMap(new HashMap<String, Object>() {
+ private static final long serialVersionUID = 1L;
+ {
+ put(DOMUtils.DISALLOW_DOCTYPE_FEATURE, true);
+
+ }
+ })).getDocumentElement();
}
/**