[cpp-sp] branch master updated: SSPCPP-840 - Warn on duplicated handler locations
Scott Cantor
cantor.2 at osu.edu
Fri Oct 12 12:40:00 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor 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=4551c968210f1b79f1c160500bc877a2e77ec3bd
The following commit(s) were added to refs/heads/master by this push:
new 4551c96 SSPCPP-840 - Warn on duplicated handler locations
4551c96 is described below
commit 4551c968210f1b79f1c160500bc877a2e77ec3bd
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Oct 12 12:38:45 2018 -0400
SSPCPP-840 - Warn on duplicated handler locations
https://issues.shibboleth.net/jira/browse/SSPCPP-840
---
shibsp/impl/XMLApplication.cpp | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/shibsp/impl/XMLApplication.cpp b/shibsp/impl/XMLApplication.cpp
index 508c7c8..06f342a 100644
--- a/shibsp/impl/XMLApplication.cpp
+++ b/shibsp/impl/XMLApplication.cpp
@@ -527,10 +527,26 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
while (child) {
if (!child->hasAttributeNS(nullptr, Location)) {
auto_ptr_char hclass(child->getLocalName());
- log.error("%s handler with no Location property cannot be processed", hclass.get());
+ log.error("%s handler with no Location property cannot be processed for application (%s)",
+ hclass.get(), getId());
child = XMLHelper::getNextSiblingElement(child);
continue;
}
+
+ auto_ptr_char dupcheck(child->getAttributeNS(nullptr, Location));
+ if (dupcheck.get() && *dupcheck.get()) {
+ string _dupcheck(dupcheck.get());
+ if (*_dupcheck.begin() != '/')
+ _dupcheck.insert(_dupcheck.begin(), '/');
+ if (m_handlerMap.find(_dupcheck) != m_handlerMap.end()) {
+ auto_ptr_char hclass(child->getLocalName());
+ log.error("%s handler at duplicate Location (%s) will not be processed for application (%s)",
+ hclass.get(), _dupcheck.c_str(), getId());
+ child = XMLHelper::getNextSiblingElement(child);
+ continue;
+ }
+ }
+
try {
boost::shared_ptr<Handler> handler;
if (XMLString::equals(child->getLocalName(), _AssertionConsumerService)) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list