[cpp-sp] branch master updated: SSPCPP-711 Bracket a regexp with a try/catch
Rod Widdowson
rdw at steadingsoftware.com
Wed Mar 1 04:01:29 EST 2017
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=1bc1a271df01f2f2f84173e9240984bd81d82dbb
The following commit(s) were added to refs/heads/master by this push:
new 1bc1a27 SSPCPP-711 Bracket a regexp with a try/catch
1bc1a27 is described below
commit 1bc1a271df01f2f2f84173e9240984bd81d82dbb
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: 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());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list