[shibboleth-sp2] 18/82: SSPCPP-711 Bracket a regexp with a try/catch
Etienne Dysli Metref
edm-guest at moszumanska.debian.org
Thu Nov 16 08:16:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
edm-guest pushed a commit to branch master
in repository shibboleth-sp2.
commit 1bc1a271df01f2f2f84173e9240984bd81d82dbb
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