bamaer commented on code in PR #9590:
URL: https://github.com/apache/hop/pull/9590#discussion_r4640934064
##########
plugins/transforms/textchunker/src/main/java/org/apache/hop/pipeline/transforms/chunker/document/hopxml/HopXmlSupport.java:
##########
@@ -356,16 +363,21 @@ private static void serializeElement(Element element,
StringBuilder sb, int dept
}
String text = SecretRedaction.redact(tag, textOnly.toString().trim());
+ if (secretEntryValue && !text.isEmpty()) {
+ text = SecretRedaction.REDACTED;
+ }
if (childElements.isEmpty()) {
if (!text.isEmpty() && !SKIP_TAGS.contains(tag)) {
indent(sb, depth).append(tag).append(": ").append(text).append('\n');
}
return;
}
+ // The root is the transform or action itself: its <name> is not the name
of an entry.
+ boolean secretEntry = depth > 0 && isSecretEntry(childElements);
Review Comment:
Limited to real entries: `<name>` only counts inside `<parameter>`, and
`<variable>` / `<variable_name>` count anywhere. `nullif` is no longer an entry
value, so fields named `token_count` or `password_changed_at` keep their
settings. This means Add constants isn't covered: its fields look the same as
every other field list.
##########
plugins/transforms/textchunker/src/main/java/org/apache/hop/pipeline/transforms/chunker/document/hopxml/HopXmlSupport.java:
##########
@@ -356,16 +363,21 @@ private static void serializeElement(Element element,
StringBuilder sb, int dept
}
String text = SecretRedaction.redact(tag, textOnly.toString().trim());
+ if (secretEntryValue && !text.isEmpty()) {
Review Comment:
Done in `SecretRedaction`, so it applies everywhere: a value that is only
`${...}` is kept, including under tag names like `<password>`. `x${SUFFIX}` is
still redacted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]