[shibboleth-sp2] 08/100: Fixed crash when removing lone assertion due to condition check (bug 111)
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to annotated tag 1.2.1
in repository shibboleth-sp2.
commit 97412c2538924b8bfdf233a961d9259612238973
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Sun Aug 8 21:03:53 2004 +0000
Fixed crash when removing lone assertion due to condition check (bug 111)
---
shib/ShibBinding.cpp | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/shib/ShibBinding.cpp b/shib/ShibBinding.cpp
index 7226619..67c778c 100644
--- a/shib/ShibBinding.cpp
+++ b/shib/ShibBinding.cpp
@@ -133,8 +133,10 @@ SAMLResponse* ShibBinding::send(
auto_ptr<SAMLResponse> r(m_binding->send(*ab, req, conf));
if (r->isSigned() && !t.validate(m_revocations,m_AA,*r))
throw TrustException("ShibBinding::send() unable to verify signed response");
+
+ unsigned long i;
Iterator<SAMLAssertion*> _a=r->getAssertions();
- for (unsigned long i=0; i < _a.size(); i++) {
+ for (i=0; i < _a.size(); i++) {
// Check any conditions.
Iterator<SAMLCondition*> conds=_a[i]->getConditions();
while (conds.hasNext()) {
@@ -146,7 +148,9 @@ SAMLResponse* ShibBinding::send(
break;
}
}
-
+ }
+
+ for (i=0; i < _a.size(); i++) {
// Check signature.
if (_a[i]->isSigned() && !t.validate(m_revocations,m_AA,*(_a[i]))) {
log.warn("signed assertion failed to validate, removing it");
@@ -190,8 +194,9 @@ SAMLResponse* ShibBinding::send(
if (r->isSigned() && !t.validate(m_revocations,m_AA,*r))
throw TrustException("ShibBinding::send() unable to verify signed response");
+ unsigned long i;
Iterator<SAMLAssertion*> _a=r->getAssertions();
- for (unsigned long i=0; i < _a.size(); i++) {
+ for (i=0; i < _a.size(); i++) {
// Check any conditions.
Iterator<SAMLCondition*> conds=_a[i]->getConditions();
while (conds.hasNext()) {
@@ -202,7 +207,9 @@ SAMLResponse* ShibBinding::send(
i--;
}
}
-
+ }
+
+ for (i=0; i < _a.size(); i++) {
// Check signature.
if (_a[i]->isSigned() && !t.validate(m_revocations,m_AA,*(_a[i]))) {
log.warn("signed assertion failed to validate, removing it");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git
More information about the Pkg-shibboleth-devel
mailing list