diff options
5 files changed, 43 insertions, 12 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; + } + + } diff --git a/id/ConfigWebTool/src/main/webapp/index.jsp b/id/ConfigWebTool/src/main/webapp/index.jsp index f4c853792..4c78699fc 100644 --- a/id/ConfigWebTool/src/main/webapp/index.jsp +++ b/id/ConfigWebTool/src/main/webapp/index.jsp @@ -55,11 +55,12 @@ <s:submit key="webpages.index.login" action="authenticate"/> </s:form> - - <div id="bkulogin"> - <a id="bkuloginbutton" href="servlet/pvp2login"><%=LanguageHelper.getGUIString("webpages.index.login.pvp2", request) %></a> - </div> - + + <s:if test="isPvp2LoginActiv()"> + <div id="bkulogin"> + <a id="bkuloginbutton" href="servlet/pvp2login"><%=LanguageHelper.getGUIString("webpages.index.login.pvp2", request) %></a> + </div> + </s:if> </div> </div> diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js index 305e4d1ee..b94fd9ec2 100644 --- a/id/ConfigWebTool/src/main/webapp/js/common.js +++ b/id/ConfigWebTool/src/main/webapp/js/common.js @@ -139,7 +139,7 @@ function sendVerificationMail() { function updateBKUFormPreview(module) { var value = $("#"+module).val(); - $("#formCustomPreview>iframe").attr("src", "./bkuFramePreview.action?module="+module+"&value="+value.replace("#","")); + $("#formCustomPreview>iframe").attr("src", "./bkuFramePreview.action?module="+module+"&value="+encodeURIComponent(value.replace("#",""))); } function userOnLoad() { UseUserNamePassword(); |