Skip to content

Commit 8c47615

Browse files
SRE Fix: html injection issue resolved
1 parent bb5fe08 commit 8c47615

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/contentstack/utils/AutomateCommon.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
public class AutomateCommon {
2323

24-
private static final String ASSET = AutomateCommon.class.getSimpleName();
24+
25+
private static final String ASSET = "asset";
2526

2627
private AutomateCommon() {
2728
throw new IllegalStateException("Not allowed to create instance of AutomateCommon");
@@ -176,7 +177,7 @@ private static String extractKeys(@NotNull JSONObject jsonNode, Option renderObj
176177
JSONObject contentToPass = filteredContent.get();
177178
return getStringOption(renderObject, metadata, contentToPass);
178179
} else {
179-
if (attrType.equalsIgnoreCase("asset")) {
180+
if (attrType.equalsIgnoreCase(ASSET)) {
180181
return renderObject.renderNode("img", jsonNode, nodeJsonArray -> doRawProcessing(nodeJsonArray, renderObject, embedItem));
181182
}
182183
}

0 commit comments

Comments
 (0)