From cba52c9e6c67ae2ee723c76f0c9ed165b657df63 Mon Sep 17 00:00:00 2001 From: aribeiro Date: Mon, 12 Jul 2021 15:10:19 +0100 Subject: Fix security vulnerabilities Issue-ID: SDC-3634 Signed-off-by: aribeiro Change-Id: I2ad864179cea8021773a9ea80953d995d75d36d0 --- .../types/VendorLicenseModelRequestDto.java | 27 ++++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java index 625cc721a9..ba8fd96e6e 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java @@ -22,7 +22,10 @@ package org.openecomp.sdcrests.vendorlicense.types; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import lombok.Data; +import org.openecomp.sdc.common.util.ValidationUtils; +@Data @Schema(description = "VendorLicenseModelRequest") public class VendorLicenseModelRequestDto { @@ -35,27 +38,11 @@ public class VendorLicenseModelRequestDto { @NotNull private String iconRef; - public String getVendorName() { - return vendorName; + public void setVendorName(final String vendorName) { + this.vendorName = ValidationUtils.sanitizeInputString(vendorName); } - public void setVendorName(String vendorName) { - this.vendorName = vendorName; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getIconRef() { - return iconRef; - } - - public void setIconRef(String iconRef) { - this.iconRef = iconRef; + public void setDescription(final String description) { + this.description = ValidationUtils.sanitizeInputString(description); } } -- cgit 1.2.3-korg