github-advanced-security[bot] commented on code in PR #1064:
URL: https://github.com/apache/syncope/pull/1064#discussion_r2066653830


##########
common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/RealmTO.java:
##########
@@ -143,6 +162,45 @@
         this.ticketExpirationPolicy = ticketExpirationPolicy;
     }
 
+    @JacksonXmlElementWrapper(localName = "plainAttrs")
+    @JacksonXmlProperty(localName = "plainAttr")
+    @Override
+    public Set<Attr> getPlainAttrs() {

Review Comment:
   ## Exposing internal representation
   
   getPlainAttrs exposes the internal representation stored in field 
plainAttrs. The value may be modified [after this call to getPlainAttrs](1).
   getPlainAttrs exposes the internal representation stored in field 
plainAttrs. The value may be modified [after this call to getPlainAttrs](2).
   getPlainAttrs exposes the internal representation stored in field 
plainAttrs. The value may be modified [after this call to getPlainAttrs](3).
   getPlainAttrs exposes the internal representation stored in field 
plainAttrs. The value may be modified [after this call to getPlainAttrs](4).
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2227)



##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ItemTransformer.java:
##########
@@ -34,6 +35,24 @@
  */
 public interface ItemTransformer {
 
+    /**
+     * Invoked while preparing attribute values to be sent out to external 
resource during propagation.
+     *
+     * @param item mapping item
+     * @param realm realm
+     * @param schemaType schema type
+     * @param values original values
+     * @return transformed values
+     */
+    default Pair<AttrSchemaType, List<PlainAttrValue>> beforePropagation(
+            Item item,

Review Comment:
   ## Useless parameter
   
   The parameter 'item' is never used.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2229)



##########
common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/RealmTO.java:
##########
@@ -143,6 +162,45 @@
         this.ticketExpirationPolicy = ticketExpirationPolicy;
     }
 
+    @JacksonXmlElementWrapper(localName = "plainAttrs")
+    @JacksonXmlProperty(localName = "plainAttr")
+    @Override
+    public Set<Attr> getPlainAttrs() {
+        return plainAttrs;
+    }
+
+    @JsonIgnore
+    @Override
+    public Optional<Attr> getPlainAttr(final String schema) {
+        return plainAttrs.stream().filter(attr -> 
attr.getSchema().equals(schema)).findFirst();
+    }
+
+    @JacksonXmlElementWrapper(localName = "derAttrs")
+    @JacksonXmlProperty(localName = "derAttr")
+    @Override
+    public Set<Attr> getDerAttrs() {

Review Comment:
   ## Exposing internal representation
   
   getDerAttrs exposes the internal representation stored in field derAttrs. 
The value may be modified [after this call to getDerAttrs](1).
   getDerAttrs exposes the internal representation stored in field derAttrs. 
The value may be modified [after this call to getDerAttrs](2).
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2226)



##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ItemTransformer.java:
##########
@@ -34,6 +35,24 @@
  */
 public interface ItemTransformer {
 
+    /**
+     * Invoked while preparing attribute values to be sent out to external 
resource during propagation.
+     *
+     * @param item mapping item
+     * @param realm realm
+     * @param schemaType schema type
+     * @param values original values
+     * @return transformed values
+     */
+    default Pair<AttrSchemaType, List<PlainAttrValue>> beforePropagation(
+            Item item,
+            Realm realm,

Review Comment:
   ## Useless parameter
   
   The parameter 'realm' is never used.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2230)



##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AttributableDataBinder.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.java.data;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AttributableTO;
+import org.apache.syncope.core.persistence.api.attrvalue.DropdownValueProvider;
+import 
org.apache.syncope.core.persistence.api.attrvalue.InvalidPlainAttrValueException;
+import 
org.apache.syncope.core.persistence.api.attrvalue.PlainAttrValidationManager;
+import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
+import org.apache.syncope.core.persistence.api.entity.Attributable;
+import org.apache.syncope.core.persistence.api.entity.PlainAttr;
+import org.apache.syncope.core.persistence.api.entity.PlainSchema;
+import org.apache.syncope.core.provisioning.api.DerAttrHandler;
+import org.apache.syncope.core.provisioning.api.IntAttrNameParser;
+import org.apache.syncope.core.provisioning.api.MappingManager;
+import org.apache.syncope.core.provisioning.api.jexl.JexlUtils;
+import org.apache.syncope.core.spring.implementation.ImplementationManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+abstract class AttributableDataBinder {
+
+    protected static final Logger LOG = 
LoggerFactory.getLogger(AttributableDataBinder.class);
+
+    protected final PlainSchemaDAO plainSchemaDAO;
+
+    protected final PlainAttrValidationManager validator;
+
+    protected final DerAttrHandler derAttrHandler;
+
+    protected final MappingManager mappingManager;
+
+    protected final IntAttrNameParser intAttrNameParser;
+
+    private final Map<String, DropdownValueProvider> dropdownValueProviders = 
new ConcurrentHashMap<>();
+
+    protected AttributableDataBinder(
+            final PlainSchemaDAO plainSchemaDAO,
+            final PlainAttrValidationManager validator,
+            final DerAttrHandler derAttrHandler,
+            final MappingManager mappingManager,
+            final IntAttrNameParser intAttrNameParser) {
+
+        this.plainSchemaDAO = plainSchemaDAO;
+        this.validator = validator;
+        this.derAttrHandler = derAttrHandler;
+        this.mappingManager = mappingManager;
+        this.intAttrNameParser = intAttrNameParser;
+    }
+
+    protected Optional<PlainSchema> getPlainSchema(final String schemaName) {
+        PlainSchema schema = null;
+        if (StringUtils.isNotBlank(schemaName)) {
+            schema = plainSchemaDAO.findById(schemaName).orElse(null);
+
+            // safely ignore invalid schemas from Attr
+            if (schema == null) {
+                LOG.debug("Ignoring invalid schema {}", schemaName);

Review Comment:
   ## Log Injection
   
   This log entry depends on a [user-provided value](1).
   This log entry depends on a [user-provided value](2).
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2221)



##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java:
##########
@@ -222,20 +222,13 @@
                 }
 
                 if (provisionTO.getVirSchemas().isEmpty()) {
-                    for (VirSchema s : 
virSchemaDAO.findByResourceAndAnyType(resource.getKey(), anyType.getKey())) {
-                        virSchemaDAO.delete(s);
-                    }
+                    virSchemaDAO.findByResourceAndAnyType(resource.getKey(), 
anyType.getKey()).
+                            forEach(virSchemaDAO::delete);
                 } else {
-                    for (String schemaName : provisionTO.getVirSchemas()) {
-                        VirSchema schema = 
virSchemaDAO.findById(schemaName).orElse(null);
-                        if (schema == null) {
-                            LOG.debug("Invalid {} specified: {}, ignoring...",
-                                    VirSchema.class.getSimpleName(), 
schemaName);
-                        } else {
-                            schema.setResource(resource);
-                            schema.setAnyType(anyType);
-                        }
-                    }
+                    provisionTO.getVirSchemas().forEach(schemaName -> 
virSchemaDAO.findById(schemaName).ifPresentOrElse(
+                            schema -> schema.setResource(resource),
+                            () -> LOG.debug("Invalid {} specified: {}, 
ignoring...",
+                                    VirSchema.class.getSimpleName(), 
schemaName)));

Review Comment:
   ## Log Injection
   
   This log entry depends on a [user-provided value](1).
   This log entry depends on a [user-provided value](2).
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2225)



##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultMappingManager.java:
##########
@@ -449,48 +428,45 @@
     }
 
     @Override
-    public Pair<String, Set<Attribute>> prepareAttrsFromRealm(final Realm 
realm, final OrgUnit orgUnit) {
-        LOG.debug("Preparing resource attributes for {} with orgUnit {}", 
realm, orgUnit);
+    public Pair<String, Set<Attribute>> prepareAttrsFromRealm(final Realm 
realm, final ExternalResource resource) {
+        if (resource.getOrgUnit() == null) {
+            LOG.error("No mapping configured for Realms");
+            return Pair.of(null, Set.of());
+        }
+
+        LOG.debug("Preparing resource attributes for {} with orgUnit {}", 
realm, resource.getOrgUnit());

Review Comment:
   ## Use of default toString()
   
   Default toString(): OrgUnit inherits toString() from Object, and so is not 
suitable for printing.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2228)



##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/RealmDataBinderImpl.java:
##########
@@ -62,21 +81,101 @@
 
     public RealmDataBinderImpl(
             final AnyTypeDAO anyTypeDAO,
+            final AnyTypeClassDAO anyTypeClassDAO,
             final ImplementationDAO implementationDAO,
             final RealmDAO realmDAO,
             final PolicyDAO policyDAO,
             final ExternalResourceDAO resourceDAO,
-            final EntityFactory entityFactory) {
-
+            final PlainSchemaDAO plainSchemaDAO,
+            final EntityFactory entityFactory,
+            final DerAttrHandler derAttrHandler,
+            final PlainAttrValidationManager validator,
+            final MappingManager mappingManager,
+            final IntAttrNameParser intAttrNameParser) {
+
+        super(plainSchemaDAO, validator, derAttrHandler, mappingManager, 
intAttrNameParser);
         this.anyTypeDAO = anyTypeDAO;
+        this.anyTypeClassDAO = anyTypeClassDAO;
         this.implementationDAO = implementationDAO;
         this.realmDAO = realmDAO;
         this.policyDAO = policyDAO;
         this.resourceDAO = resourceDAO;
         this.entityFactory = entityFactory;
     }
 
-    protected void setTemplates(final RealmTO realmTO, final Realm realm) {
+    protected void fill(
+            final RealmTO realmTO,
+            final Realm realm,
+            final SyncopeClientCompositeException scce) {
+
+        realm.getPlainAttrs().forEach(realm::remove);
+
+        SyncopeClientException invalidValues = 
SyncopeClientException.build(ClientExceptionType.InvalidValues);
+
+        realmTO.getPlainAttrs().stream().
+                filter(attrTO -> !attrTO.getValues().isEmpty()).
+                forEach(attrTO -> 
getPlainSchema(attrTO.getSchema()).ifPresent(schema -> {
+
+            PlainAttr attr = realm.getPlainAttr(schema.getKey()).orElseGet(() 
-> {
+                PlainAttr newAttr = new PlainAttr();
+                newAttr.setPlainSchema(schema);
+                return newAttr;
+            });
+            fillAttr(realmTO, attrTO.getValues(), schema, attr, invalidValues);
+
+            if (!attr.getValuesAsStrings().isEmpty()) {
+                realm.add(attr);
+            }
+        }));
+
+        if (!invalidValues.isEmpty()) {
+            scce.addException(invalidValues);
+        }
+
+        SyncopeClientException reqValMissing = 
SyncopeClientException.build(ClientExceptionType.RequiredValuesMissing);
+        // Check if there is some mandatory schema defined for which no value 
has been provided
+        realm.getAnyTypeClass().getPlainSchemas().forEach(schema -> 
checkMandatory(
+                schema, realm.getPlainAttr(schema.getKey()).orElse(null), 
realm, reqValMissing));
+        if (!reqValMissing.isEmpty()) {
+            scce.addException(reqValMissing);
+        }
+    }
+
+    protected void bind(final Realm realm, final RealmTO realmTO, final 
SyncopeClientCompositeException scce) {
+        realm.setName(realmTO.getName());
+
+        if (realmTO.getAnyTypeClass() == null) {
+            realm.setAnyTypeClass(null);
+        } else {
+            
anyTypeClassDAO.findById(realmTO.getAnyTypeClass()).ifPresentOrElse(
+                    realm::setAnyTypeClass,
+                    () -> LOG.debug("Invalid {} {}, ignoring...",
+                            AnyTypeClass.class.getSimpleName(), 
realmTO.getAnyTypeClass()));

Review Comment:
   ## Log Injection
   
   This log entry depends on a [user-provided value](1).
   This log entry depends on a [user-provided value](2).
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2223)



##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AttributableDataBinder.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.java.data;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AttributableTO;
+import org.apache.syncope.core.persistence.api.attrvalue.DropdownValueProvider;
+import 
org.apache.syncope.core.persistence.api.attrvalue.InvalidPlainAttrValueException;
+import 
org.apache.syncope.core.persistence.api.attrvalue.PlainAttrValidationManager;
+import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
+import org.apache.syncope.core.persistence.api.entity.Attributable;
+import org.apache.syncope.core.persistence.api.entity.PlainAttr;
+import org.apache.syncope.core.persistence.api.entity.PlainSchema;
+import org.apache.syncope.core.provisioning.api.DerAttrHandler;
+import org.apache.syncope.core.provisioning.api.IntAttrNameParser;
+import org.apache.syncope.core.provisioning.api.MappingManager;
+import org.apache.syncope.core.provisioning.api.jexl.JexlUtils;
+import org.apache.syncope.core.spring.implementation.ImplementationManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+abstract class AttributableDataBinder {
+
+    protected static final Logger LOG = 
LoggerFactory.getLogger(AttributableDataBinder.class);
+
+    protected final PlainSchemaDAO plainSchemaDAO;
+
+    protected final PlainAttrValidationManager validator;
+
+    protected final DerAttrHandler derAttrHandler;
+
+    protected final MappingManager mappingManager;
+
+    protected final IntAttrNameParser intAttrNameParser;
+
+    private final Map<String, DropdownValueProvider> dropdownValueProviders = 
new ConcurrentHashMap<>();
+
+    protected AttributableDataBinder(
+            final PlainSchemaDAO plainSchemaDAO,
+            final PlainAttrValidationManager validator,
+            final DerAttrHandler derAttrHandler,
+            final MappingManager mappingManager,
+            final IntAttrNameParser intAttrNameParser) {
+
+        this.plainSchemaDAO = plainSchemaDAO;
+        this.validator = validator;
+        this.derAttrHandler = derAttrHandler;
+        this.mappingManager = mappingManager;
+        this.intAttrNameParser = intAttrNameParser;
+    }
+
+    protected Optional<PlainSchema> getPlainSchema(final String schemaName) {
+        PlainSchema schema = null;
+        if (StringUtils.isNotBlank(schemaName)) {
+            schema = plainSchemaDAO.findById(schemaName).orElse(null);
+
+            // safely ignore invalid schemas from Attr
+            if (schema == null) {
+                LOG.debug("Ignoring invalid schema {}", schemaName);
+            } else if (schema.isReadonly()) {
+                schema = null;
+                LOG.debug("Ignoring readonly schema {}", schemaName);
+            }
+        }
+
+        return Optional.ofNullable(schema);
+    }
+
+    protected void checkMandatory(
+            final PlainSchema schema,
+            final PlainAttr attr,
+            final Attributable attributable,
+            final SyncopeClientException reqValMissing) {
+
+        if (attr == null
+                && !schema.isReadonly()
+                && 
JexlUtils.evaluateMandatoryCondition(schema.getMandatoryCondition(), 
attributable, derAttrHandler)) {
+
+            LOG.error("Mandatory schema {} not provided with values", 
schema.getKey());
+
+            reqValMissing.getElements().add(schema.getKey());
+        }
+    }
+
+    protected void fillAttr(
+            final AttributableTO attributableTO,
+            final List<String> values,
+            final PlainSchema schema,
+            final PlainAttr attr,
+            final SyncopeClientException invalidValues) {
+
+        // if schema is multivalue, all values are considered for addition;
+        // otherwise only the fist one - if provided - is considered
+        List<String> valuesProvided = schema.isMultivalue()
+                ? values
+                : (values.isEmpty() || values.getFirst() == null
+                ? List.of()
+                : List.of(values.getFirst()));
+
+        valuesProvided.forEach(value -> {
+            if (StringUtils.isBlank(value)) {
+                LOG.debug("Null value for {}, ignoring", schema.getKey());
+            } else {
+                try {
+                    switch (schema.getType()) {
+                        case Enum -> {
+                            if (!schema.getEnumValues().containsKey(value)) {
+                                throw new InvalidPlainAttrValueException(
+                                        '\'' + value + "' is not one of: " + 
schema.getEnumValues().keySet());
+                            }
+                        }
+
+                        case Dropdown -> {
+                            List<String> dropdownValues = List.of();
+                            try {
+                                DropdownValueProvider provider = 
ImplementationManager.build(
+                                        schema.getDropdownValueProvider(),
+                                        () -> dropdownValueProviders.get(
+                                                
schema.getDropdownValueProvider().getKey()),
+                                        instance -> dropdownValueProviders.put(
+                                                
schema.getDropdownValueProvider().getKey(), instance));
+                                dropdownValues = 
provider.getChoices(attributableTO);
+                            } catch (Exception e) {
+                                LOG.error("While getting dropdown values for 
{}", schema.getKey(), e);
+                            }
+
+                            if (!dropdownValues.contains(value)) {
+                                throw new InvalidPlainAttrValueException(
+                                        '\'' + value + "' is not one of: " + 
dropdownValues);
+                            }
+                        }
+
+                        default -> {
+                        }
+                    }
+
+                    attr.add(validator, value);
+                } catch (InvalidPlainAttrValueException e) {
+                    LOG.warn("Invalid value for attribute {}: {}",
+                            schema.getKey(), StringUtils.abbreviate(value, 
20), e);

Review Comment:
   ## Log Injection
   
   This log entry depends on a [user-provided value](1).
   This log entry depends on a [user-provided value](2).
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2220)



##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AttributableDataBinder.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.java.data;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AttributableTO;
+import org.apache.syncope.core.persistence.api.attrvalue.DropdownValueProvider;
+import 
org.apache.syncope.core.persistence.api.attrvalue.InvalidPlainAttrValueException;
+import 
org.apache.syncope.core.persistence.api.attrvalue.PlainAttrValidationManager;
+import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
+import org.apache.syncope.core.persistence.api.entity.Attributable;
+import org.apache.syncope.core.persistence.api.entity.PlainAttr;
+import org.apache.syncope.core.persistence.api.entity.PlainSchema;
+import org.apache.syncope.core.provisioning.api.DerAttrHandler;
+import org.apache.syncope.core.provisioning.api.IntAttrNameParser;
+import org.apache.syncope.core.provisioning.api.MappingManager;
+import org.apache.syncope.core.provisioning.api.jexl.JexlUtils;
+import org.apache.syncope.core.spring.implementation.ImplementationManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+abstract class AttributableDataBinder {
+
+    protected static final Logger LOG = 
LoggerFactory.getLogger(AttributableDataBinder.class);
+
+    protected final PlainSchemaDAO plainSchemaDAO;
+
+    protected final PlainAttrValidationManager validator;
+
+    protected final DerAttrHandler derAttrHandler;
+
+    protected final MappingManager mappingManager;
+
+    protected final IntAttrNameParser intAttrNameParser;
+
+    private final Map<String, DropdownValueProvider> dropdownValueProviders = 
new ConcurrentHashMap<>();
+
+    protected AttributableDataBinder(
+            final PlainSchemaDAO plainSchemaDAO,
+            final PlainAttrValidationManager validator,
+            final DerAttrHandler derAttrHandler,
+            final MappingManager mappingManager,
+            final IntAttrNameParser intAttrNameParser) {
+
+        this.plainSchemaDAO = plainSchemaDAO;
+        this.validator = validator;
+        this.derAttrHandler = derAttrHandler;
+        this.mappingManager = mappingManager;
+        this.intAttrNameParser = intAttrNameParser;
+    }
+
+    protected Optional<PlainSchema> getPlainSchema(final String schemaName) {
+        PlainSchema schema = null;
+        if (StringUtils.isNotBlank(schemaName)) {
+            schema = plainSchemaDAO.findById(schemaName).orElse(null);
+
+            // safely ignore invalid schemas from Attr
+            if (schema == null) {
+                LOG.debug("Ignoring invalid schema {}", schemaName);
+            } else if (schema.isReadonly()) {
+                schema = null;
+                LOG.debug("Ignoring readonly schema {}", schemaName);

Review Comment:
   ## Log Injection
   
   This log entry depends on a [user-provided value](1).
   This log entry depends on a [user-provided value](2).
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/2222)



-- 
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: dev-unsubscr...@syncope.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to