aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-11-08 09:02:09 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-11-08 09:02:09 +0100
commit87600aff054cf60a1d6e272b0d993d852aaf4763 (patch)
tree9d379c79955473c0c2cc5d3bab61ef5b7839d144 /id/ConfigWebTool/src/main/java/at
parent8d417057d38d56510a1d3d2e39381a1df3dd96ee (diff)
downloadmoa-id-spss-87600aff054cf60a1d6e272b0d993d852aaf4763.tar.gz
moa-id-spss-87600aff054cf60a1d6e272b0d993d852aaf4763.tar.bz2
moa-id-spss-87600aff054cf60a1d6e272b0d993d852aaf4763.zip
BugFixes:
--LoginFormPreview: Header text UTF8 encoding error --PVP2 Login: do not show loginbutton in case of PVP2 login is not enabled
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java6
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java12
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java24
3 files changed, 36 insertions, 6 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
index 2b6c326eb..fb468967c 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
@@ -138,9 +138,9 @@ public class ConfigurationProvider {
return Integer.getInteger(delay, 12);
}
- public String getContactMailAddress() {
- return props.getProperty("general.contact.mail");
- }
+// public String getContactMailAddress() {
+// return props.getProperty("general.contact.mail");
+// }
public String getSSOLogOutURL() {
return props.getProperty("general.login.pvp2.idp.sso.logout.url");
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 56d6ba9d7..04b4da19a 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -1,12 +1,13 @@
package at.gv.egovernment.moa.id.configuration.struts.action;
+import iaik.utils.URLDecoder;
+
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
-import java.net.URI;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.Date;
@@ -18,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
@@ -66,6 +68,7 @@ import at.gv.egovernment.moa.id.configuration.validation.oa.OASAML1ConfigValidat
import at.gv.egovernment.moa.id.configuration.validation.oa.OASSOConfigValidation;
import at.gv.egovernment.moa.id.configuration.validation.oa.OASTORKConfigValidation;
import at.gv.egovernment.moa.id.util.FormBuildUtils;
+import at.gv.egovernment.moa.id.util.HTTPUtils;
import at.gv.egovernment.moa.id.util.Random;
import at.gv.egovernment.moa.util.MiscUtil;
@@ -667,9 +670,16 @@ ServletResponseAware {
Map<String, String> map = (Map<String, String>) mapobj;
+ request.setCharacterEncoding("UTF-8");
+
String module = request.getParameter(Constants.REQUEST_FORMCUSTOM_MODULE);
String value = request.getParameter(Constants.REQUEST_FORMCUSTOM_VALUE);
+ if (value != null) {
+ String[] query = URLDecoder.decode(request.getQueryString()).split("&");
+ value = query[1].substring("value=".length());
+ }
+
synchronized (map) {
if (MiscUtil.isNotEmpty(module)) {
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java
index 3bf213290..c82746dbc 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java
@@ -88,9 +88,20 @@ public class IndexAction extends ActionSupport implements ServletRequestAware,
private String ssologouturl;
+ private boolean pvp2LoginActiv = false;
+
public String start() {
-
- return Constants.STRUTS_SUCCESS;
+
+ try {
+ ConfigurationProvider config = ConfigurationProvider.getInstance();
+ pvp2LoginActiv = config.isPVP2LoginActive();
+ return Constants.STRUTS_SUCCESS;
+
+ } catch (ConfigurationException e) {
+ log.warn("An internal error occurs.", e);
+ addActionError(LanguageHelper.getErrorString("error.login.internal"));
+ return Constants.STRUTS_ERROR;
+ }
}
public String authenticate() {
@@ -809,4 +820,13 @@ public class IndexAction extends ActionSupport implements ServletRequestAware,
public void setFormID(String formID) {
this.formID = formID;
}
+
+ /**
+ * @return the pvp2LoginActiv
+ */
+ public boolean isPvp2LoginActiv() {
+ return pvp2LoginActiv;
+ }
+
+
}