diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-04-08 07:50:20 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-04-08 07:50:20 +0200 |
commit | 50c500dd107d88988cbee8207c91a16b321d6136 (patch) | |
tree | 6abd06e3f126866534e155e40c2f7e933b5357d3 /common/src/main/java/at | |
parent | ec62813f4c0e8b3002d46f7bc315e7a27d720125 (diff) | |
parent | 41882a0c5601dda478c2749ac99c2087b864c912 (diff) | |
download | moa-id-spss-50c500dd107d88988cbee8207c91a16b321d6136.tar.gz moa-id-spss-50c500dd107d88988cbee8207c91a16b321d6136.tar.bz2 moa-id-spss-50c500dd107d88988cbee8207c91a16b321d6136.zip |
Merge tag 'MOA-ID-3.1.0' into development_preview
JoinUp Release
Diffstat (limited to 'common/src/main/java/at')
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); - } - -} |