projects
/
shibboleth
/
cpp-sp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
https://issues.shibboleth.net/jira/browse/SSPCPP-310
[shibboleth/cpp-sp.git]
/
shibsp
/
attribute
/
filtering
/
impl
/
XMLAttributeFilter.cpp
diff --git
a/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
b/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
index
18bda2f
..
639d7e9
100644
(file)
--- a/
shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
+++ b/
shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
@@
-379,7
+379,7
@@
void XMLFilterImpl::filterAttributes(const FilteringContext& context, vector<Att
// If no rules apply, remove the attribute entirely.
if (rulesToRun.empty()) {
m_log.warn(
// If no rules apply, remove the attribute entirely.
if (rulesToRun.empty()) {
m_log.warn(
- "no rule found,
removing
attribute (%s) from (%s)",
+ "no rule found,
will remove
attribute (%s) from (%s)",
attr->getId(), issuer.get() ? issuer.get() : "unknown source"
);
deletedAttributes[a] = true;
attr->getId(), issuer.get() ? issuer.get() : "unknown source"
);
deletedAttributes[a] = true;
@@
-426,6
+426,10
@@
void XMLFilterImpl::filterAttributes(const FilteringContext& context, vector<Att
Attribute* attr = attributes[a];
if (deletedAttributes[a]) {
Attribute* attr = attributes[a];
if (deletedAttributes[a]) {
+ m_log.warn(
+ "removing filtered attribute (%s) from (%s)",
+ attr->getId(), issuer.get() ? issuer.get() : "unknown source"
+ );
delete attr;
deletedAttributes.erase(deletedAttributes.begin() + a);
attributes.erase(attributes.begin() + a);
delete attr;
deletedAttributes.erase(deletedAttributes.begin() + a);
attributes.erase(attributes.begin() + a);
@@
-449,6
+453,7
@@
void XMLFilterImpl::filterAttributes(const FilteringContext& context, vector<Att
attr->getId(), issuer.get() ? issuer.get() : "unknown source"
);
delete attr;
attr->getId(), issuer.get() ? issuer.get() : "unknown source"
);
delete attr;
+ deletedAttributes.erase(deletedAttributes.begin() + a);
attributes.erase(attributes.begin() + a);
continue;
}
attributes.erase(attributes.begin() + a);
continue;
}