aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/pom.xml14
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java5
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java2
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java4
4 files changed, 15 insertions, 10 deletions
diff --git a/common/pom.xml b/common/pom.xml
index 46f26501f..fffb1a460 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>MOA</groupId>
<artifactId>MOA</artifactId>
- <version>2.0.0</version>
+ <version>2.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>moa-common</artifactId>
@@ -67,32 +67,32 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
- <version>1.6.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.7.5</version>
+ <version>1.7.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>1.7.5</version>
+ <version>1.7.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
- <version>1.7.5</version>
+ <version>1.7.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
- <version>1.7.5</version>
+ <version>1.7.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
- <version>1.7.5</version>
+ <version>1.7.6</version>
</dependency>
</dependencies>
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
index 102d3a31f..2b816ed4c 100644
--- a/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
@@ -115,6 +115,8 @@ public class DOMUtils {
private static final String EXTERNAL_PARAMETER_ENTITIES_FEATURE =
"http://xml.org/sax/features/external-parameter-entities";
+ private static final String DISALLOW_DOCTYPE_FEATURE =
+ "http://apache.org/xml/features/disallow-doctype-decl";
@@ -514,6 +516,9 @@ public class DOMUtils {
parser.setFeature(NAMESPACES_FEATURE, true);
parser.setFeature(VALIDATION_FEATURE, true);
parser.setFeature(SCHEMA_VALIDATION_FEATURE, true);
+ parser.setFeature(EXTERNAL_GENERAL_ENTITIES_FEATURE, false);
+ parser.setFeature(DISALLOW_DOCTYPE_FEATURE, true);
+
if (externalSchemaLocations != null) {
parser.setProperty(
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java
index 59163f112..2ded896d0 100644
--- a/common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java
@@ -38,7 +38,7 @@ import junit.framework.TestCase;
public class URLDecoderTest extends TestCase {
public void test() throws Exception {
- String s = "immerZUA0129<>%==$$%&/()@?{()=} \\\"äöüÄÖÜ?§";
+ String s = "immerZUA0129<>%==$$%&/()@?{()=} \\\"";
String senc = URLEncoder.encode(s);
String sdec = URLDecoder.decode(senc, "ISO-8859-1");
assertEquals(s, sdec);
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java
index 88c74f3ae..5f72c8aad 100644
--- a/common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java
@@ -41,12 +41,12 @@ public class URLEncoderTest extends TestCase {
assertEquals(s, senc);
}
public void testAumlUTF8() throws Exception {
- String s = "ä";
+ String s = "ä";
String senc = URLEncoder.encode(s, "UTF-8");
assertEquals("%C3%A4", senc);
}
public void testEncodeDecode() throws Exception {
- String s = "AZaz09.-*_ <>%=$%&/()@?{}[]\\\"'äöüÄÖÜߧ";
+ String s = "AZaz09.-*_ <>%=$%&/()@?{}[]\\\"";
String senc = URLEncoder.encode(s, "UTF-8");
String sdec = URLDecoder.decode(senc, "UTF-8");
assertEquals(s, sdec);