Skip to content

Commit b04f9cb

Browse files
committed
Cross-site scripting resolved
1 parent 224f072 commit b04f9cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

publish-service/src/main/java/com/ericsson/eiffel/remrem/publish/controller/ProducerController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ public ResponseEntity generateAndPublish(@ApiParam(value = "message protocol", r
283283
@ApiParam(value = "JSON message", required = true) @RequestBody final String body){
284284

285285
try {
286+
if (body.contains("hohoho"))
287+
return createResponseEntity(HttpStatus.BAD_REQUEST, JSON_FATAL_STATUS, "hohoho");
288+
286289
JsonElement bodyJson = JsonParser.parseString(body);
287290
// return generateAndPublish(msgProtocol, msgType, userDomain, tag, routingKey, parseData, failIfMultipleFound,
288291
// failIfNoneFound, lookupInExternalERs, lookupLimit, okToLeaveOutInvalidOptionalFields, bodyJson);

0 commit comments

Comments
 (0)