projects
/
shibboleth
/
cpp-sp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8bd7d3b
)
https://issues.shibboleth.net/jira/browse/SSPCPP-522
author
Scott Cantor
<cantor.2@osu.edu>
Fri, 2 Nov 2012 20:22:00 +0000
(20:22 +0000)
committer
Scott Cantor
<cantor.2@osu.edu>
Fri, 2 Nov 2012 20:22:00 +0000
(20:22 +0000)
plugins/TransformAttributeResolver.cpp
patch
|
blob
|
history
diff --git
a/plugins/TransformAttributeResolver.cpp
b/plugins/TransformAttributeResolver.cpp
index
6b4bf7b
..
e036748
100644
(file)
--- a/
plugins/TransformAttributeResolver.cpp
+++ b/
plugins/TransformAttributeResolver.cpp
@@
-227,7
+227,10
@@
void TransformAttributeResolver::resolveAttributes(ResolutionContext& ctx) const
try {
auto_arrayptr<XMLCh> srcval(fromUTF8((*a)->getSerializedValues()[i].c_str()));
XMLCh* destval = r->get<1>()->replace(srcval.get(), r->get<2>());
try {
auto_arrayptr<XMLCh> srcval(fromUTF8((*a)->getSerializedValues()[i].c_str()));
XMLCh* destval = r->get<1>()->replace(srcval.get(), r->get<2>());
- if (destval) {
+ if (!destval)
+ continue;
+ // For some reason, it returns the source string if the match doesn't succeed.
+ if (!XMLString::equals(destval, srcval.get())) {
auto_arrayptr<char> narrow(toUTF8(destval));
XMLString::release(&destval);
if (dest) {
auto_arrayptr<char> narrow(toUTF8(destval));
XMLString::release(&destval);
if (dest) {
@@
-241,6
+244,9
@@
void TransformAttributeResolver::resolveAttributes(ResolutionContext& ctx) const
trim(destwrapper->getValues().back());
}
}
trim(destwrapper->getValues().back());
}
}
+ else {
+ XMLString::release(&destval);
+ }
}
catch (XMLException& ex) {
auto_ptr_char msg(ex.getMessage());
}
catch (XMLException& ex) {
auto_ptr_char msg(ex.getMessage());