[cpp-sp COMMIT] in /branches/REL_2/shibsp: handler/impl/SAML2Consumer.cpp impl/StorageServiceSessionCache.cpp

noreply at shibboleth.net noreply at shibboleth.net
Tue Jan 20 21:31:11 EST 2015


Author: scantor
Date: Tue Jan 20 21:31:10 2015
New Revision: 3894

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3894&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-632

Modified:
    branches/REL_2/shibsp/handler/impl/SAML2Consumer.cpp
    branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp

Modified: branches/REL_2/shibsp/handler/impl/SAML2Consumer.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/SAML2Consumer.cpp?rev=3894&r1=3893&r2=3894&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SAML2Consumer.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SAML2Consumer.cpp Tue Jan 20 21:31:10 2015
@@ -44,6 +44,7 @@
 # include <xmltooling/XMLToolingConfig.h>
 # include <xmltooling/io/HTTPRequest.h>
 # include <xmltooling/util/DateTime.h>
+# include <xmltooling/validation/ValidatorSuite.h>
 using namespace opensaml::saml2;
 using namespace opensaml::saml2p;
 using namespace opensaml::saml2md;
@@ -311,6 +312,9 @@
             // Skip unsigned assertion?
             if (!decrypted->getSignature() && requireSignedAssertions.first && requireSignedAssertions.second)
                 throw SecurityPolicyException("The incoming assertion was unsigned, violating local security policy.");
+
+            // Run the schema validators against the assertion, since it was hidden by encryption.
+            SchemaValidators.validate(decrypted.get());
 
             // We clear the security flag, so we can tell whether the token was secured on its own.
             policy.setAuthenticated(false);

Modified: branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp?rev=3894&r1=3893&r2=3894&view=diff
==============================================================================
--- branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp (original)
+++ branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp Tue Jan 20 21:31:10 2015
@@ -1233,7 +1233,8 @@
         throw FatalProfileException("Attempted to create a session with a duplicate key.");
 
     // Store the reverse mapping for logout.
-    if (nameid && m_reverseIndex && (m_excludedNames.size() == 0 || m_excludedNames.count(nameid->getName()) == 0)) {
+    if (name.get() && *name.get() && m_reverseIndex
+            && (m_excludedNames.size() == 0 || m_excludedNames.count(nameid->getName()) == 0)) {
         try {
             insert(key.get(), expires, name.get(), index.get());
         }



More information about the commits mailing list