[shibboleth-sp2] 04/19: SSPCPP-711 Bracket a regexp with a try/catch
Ferenc Wágner
wferi at moszumanska.debian.org
Wed Nov 15 22:56:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
wferi pushed a commit to branch maint-2.6
in repository shibboleth-sp2.
commit 9656aad2428e11f95aee2e451cb6876086d6cba3
Author: Rod Widdowson <rdw at steadingsoftware.com>
Date: Wed Mar 1 09:00:59 2017 +0000
SSPCPP-711 Bracket a regexp with a try/catch
https://issues.shibboleth.net/jira/browse/SSPCPP-711
---
.../filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp
index 2d64126..ff4da4e 100644
--- a/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp
@@ -96,8 +96,14 @@ namespace shibsp {
const XMLCh* val = rule.getValue();
if (val && *val) {
if (rule.Regexp()) {
- RegularExpression re(val);
- return re.matches(scope.get());
+ try {
+ RegularExpression re(val);
+ return re.matches(scope.get());
+ }
+ catch (XMLException& ex) {
+ xmltooling::auto_ptr_char temp(ex.getMessage());
+ throw ConfigurationException(temp.get());
+ }
}
else {
return XMLString::equals(val, scope.get());
--
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