From 4af2a06ad0d4dc021277b115d15bbeeede3c23b7 Mon Sep 17 00:00:00 2001 From: kstranacher Date: Thu, 9 Feb 2012 21:11:31 +0000 Subject: =?UTF-8?q?Update=20MOA-SPSS-Konfig=20Schema=20(Blacklists)=20MOAS?= =?UTF-8?q?ecurityManager=20f=C3=BCr=20Blacklists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1236 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../egovernment/moa/id/auth/AuthenticationServer.java | 19 ++++++++++++++----- .../id/auth/parser/IdentityLinkAssertionParser.java | 4 ++-- .../CreateXMLSignatureResponseValidator.java | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) (limited to 'id/server/idserverlib') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index a68dca65a..b8fa4f412 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -501,16 +501,19 @@ public class AuthenticationServer implements MOAIDAuthConstants { // check if an identity link was found // Errorcode 2911 von Trustdesk BKU (nicht spezifikationskonform (SL1.2)) - CharSequence se = "ErrorCode>2911".substring(0); - boolean b = xmlInfoboxReadResponse.contains(se); - if (b) { // no identity link found + //CharSequence se = "ErrorCode>2911".substring(0); + //boolean b = xmlInfoboxReadResponse.contains(se); + String se = "ErrorCode>2911"; + int b = xmlInfoboxReadResponse.indexOf(se); + if (b!=-1) { // no identity link found Logger.info("Es konnte keine Personenbindung auf der Karte gefunden werden. Versuche Anmeldung als ausländische eID."); return null; } // spezifikationsgemäßer (SL1.2) Errorcode se = "ErrorCode>4002"; - b = xmlInfoboxReadResponse.contains(se); - if (b) { // Unbekannter Infoboxbezeichner + //b = xmlInfoboxReadResponse.contains(se); + b = xmlInfoboxReadResponse.indexOf(se); + if (b!=-1) { // Unbekannter Infoboxbezeichner Logger.info("Unbekannter Infoboxbezeichner. Versuche Anmeldung als ausländische eID."); return null; } @@ -1659,6 +1662,12 @@ public class AuthenticationServer implements MOAIDAuthConstants { Element mandatePerson = tempIdentityLink.getPrPerson(); + try { + System.out.println("MANDATE: " + DOMUtils.serializeNode(mandatePerson)); + } + catch(Exception e) { + e.printStackTrace(); + } String mandateData = null; try { OAAuthParameter oaParam = diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java index 2e20f483c..cb3ed5ad9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java @@ -251,8 +251,8 @@ public class IdentityLinkAssertionParser { String familyname = XPathUtils.getElementValue(assertionElem, PERSON_FAMILY_NAME_XPATH, ""); // replace ' in name with ' - givenname = givenname.replace("'", "'"); - familyname = familyname.replace("'", "'"); + givenname = givenname.replaceAll("'", "'"); + familyname = familyname.replaceAll("'", "'"); identityLink.setGivenName(givenname); identityLink.setFamilyName(familyname); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java index 49105b306..dfad29e50 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java @@ -97,7 +97,7 @@ public class CreateXMLSignatureResponseValidator { throw new ValidateException("validator.32", null); } // replace ' in name with ' - issuer = issuer.replace("'", "'"); + issuer = issuer.replaceAll("'", "'"); String issueInstant = samlAssertion.getAttribute("IssueInstant"); if (!issueInstant.equals(session.getIssueInstant())) { -- cgit v1.2.3