aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java/at/gv/egovernment/moa
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main/java/at/gv/egovernment/moa')
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/Logger.java22
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Constants.java4
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java4
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/ex/EgovUtilException.java41
4 files changed, 30 insertions, 41 deletions
diff --git a/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java
index 7cb2e7daf..3730b36ce 100644
--- a/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java
@@ -168,6 +168,17 @@ public class Logger {
}
/**
+ * Info.
+ *
+ * @param string the string
+ * @param args the objects
+ */
+ public static void info(String message, Object[] args) {
+ org.slf4j.Logger logger = getLogger();
+ logger.info(prepareMessage(message), args);
+ }
+
+ /**
* Log a warning message.
*
* @param message The message to log.
@@ -210,6 +221,17 @@ public class Logger {
}
/**
+ * Log an error message with additional information.
+ *
+ * @param message The message to log.
+ * @param variables The values to substitute {} of the logmessage with.
+ */
+ public static void error(Object message, Object[] variables) {
+ org.slf4j.Logger logger = getLogger();
+ logger.error(prepareMessage(message), variables);
+ }
+
+ /**
* Log a fatal error message.
*
* @param message The message to log.
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
index 5d12691f8..5a5f4edac 100644
--- a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
@@ -443,6 +443,10 @@ public interface Constants {
/** URN prefix for context dependent id (stork). */
public static final String URN_PREFIX_STORK = URN_PREFIX + ":storkid";
+
+ //TODO: update to eIDAS prefix
+ /** URN prefix for context dependent id (eIDAS). */
+ public static final String URN_PREFIX_EIDAS = URN_PREFIX + ":storkid";
/** URN prefix for context dependent id. */
public static final String URN_PREFIX_BASEID = URN_PREFIX + ":baseid";
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 2b816ed4c..0a07fc4a7 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
@@ -246,6 +246,10 @@ public class DOMUtils {
parser.setFeature(CREATE_ENTITY_REF_NODES_FEATURE, false);
parser.setFeature(EXTERNAL_GENERAL_ENTITIES_FEATURE, false);
parser.setFeature(EXTERNAL_PARAMETER_ENTITIES_FEATURE, false);
+
+ //fix XXE problem
+ parser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
+
if (validating) {
if (externalSchemaLocations != null) {
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/ex/EgovUtilException.java b/common/src/main/java/at/gv/egovernment/moa/util/ex/EgovUtilException.java
deleted file mode 100644
index 733a2a845..000000000
--- a/common/src/main/java/at/gv/egovernment/moa/util/ex/EgovUtilException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2011 Federal Chancellery Austria and
- * Graz University of Technology
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.gv.egovernment.moa.util.ex;
-
-public class EgovUtilException extends Exception {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public EgovUtilException() {
- }
-
- public EgovUtilException(String message) {
- super(message);
- }
-
- public EgovUtilException(Throwable cause) {
- super(cause);
- }
-
- public EgovUtilException(String message, Throwable cause) {
- super(message, cause);
- }
-
-}