From fa728e0ea09a9a314037e0270e5f689039c8beb6 Mon Sep 17 00:00:00 2001 From: cantor Date: Thu, 4 Oct 2007 15:37:23 +0000 Subject: [PATCH] AND/OR rules not handling indeterminate result case. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2528 cb58f699-b61c-0410-a6fe-9272a202ed29 --- shibsp/impl/XMLAccessControl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shibsp/impl/XMLAccessControl.cpp b/shibsp/impl/XMLAccessControl.cpp index afb6bb9..123dbc6 100644 --- a/shibsp/impl/XMLAccessControl.cpp +++ b/shibsp/impl/XMLAccessControl.cpp @@ -229,7 +229,7 @@ AccessControl::aclresult_t Operator::authorized(const SPRequest& request, const { switch (m_op) { case OP_NOT: - switch (m_operands[0]->authorized(request,session)) { + switch (m_operands.front()->authorized(request,session)) { case shib_acl_true: return shib_acl_false; case shib_acl_false: @@ -241,7 +241,7 @@ AccessControl::aclresult_t Operator::authorized(const SPRequest& request, const case OP_AND: { for (vector::const_iterator i=m_operands.begin(); i!=m_operands.end(); i++) { - if (!(*i)->authorized(request,session)) + if ((*i)->authorized(request,session) != shib_acl_true) return shib_acl_false; } return shib_acl_true; @@ -250,7 +250,7 @@ AccessControl::aclresult_t Operator::authorized(const SPRequest& request, const case OP_OR: { for (vector::const_iterator i=m_operands.begin(); i!=m_operands.end(); i++) { - if ((*i)->authorized(request,session)) + if ((*i)->authorized(request,session) == shib_acl_true) return shib_acl_true; } return shib_acl_false; -- 2.1.4