Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 5538fdf4 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Fix sonar plans issues

parent 661f5f31
No related branches found
No related tags found
No related merge requests found
Pipeline #174010 failed
......@@ -126,10 +126,10 @@ public final class DomUtils {
*/
public static Transformer createNewSecureTransformer() throws TransformerConfigurationException {
TransformerFactory factory = TransformerFactory.newInstance();
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
// generic secure file processing
setConfigurationOption(factory, XMLInputFactory.SUPPORT_DTD, false);
setConfigurationOption(factory, XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
setConfigurationOption(factory, XMLConstants.FEATURE_SECURE_PROCESSING, true);
setConfigurationOption(factory, DISALLOW_DOCTYPE_FEATURE, true);
setAttributeOption(factory, XMLConstants.ACCESS_EXTERNAL_DTD, "");
setAttributeOption(factory, XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
......
......@@ -198,10 +198,6 @@ public class DomainEditController {
if (propertyRO == null || StringUtils.isBlank(propertyRO.getProperty())) {
throw new SMPRuntimeException(ErrorCode.INVALID_REQUEST, "ValidateProperty", "Property name is empty!");
}
SMPDomainPropertyEnum.getByProperty(propertyRO.getProperty())
.orElseThrow(() -> new SMPRuntimeException(ErrorCode.INVALID_REQUEST,
"ValidateProperty", "Property [" + propertyRO.getProperty() + "] is not domain property!"));
return uiDomainEditService.validateDomainProperty(propertyRO);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment