ilgrosso commented on code in PR #1628:
URL: https://github.com/apache/syncope/pull/1628#discussion_r4663748310
##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ClientAppDataBinderImpl.java:
##########
@@ -294,6 +297,29 @@
}
protected void doUpdate(final OIDCRPClientApp clientApp, final
OIDCRPClientAppTO clientAppTO) {
+ if
(clientAppTO.getTokenExchangeAllowedActorTokenTypes().stream().anyMatch(StringUtils::isBlank))
{
+ SyncopeClientException invalid =
SyncopeClientException.build(ClientExceptionType.InvalidValues);
+ invalid.getElements().add("Token exchange actor token types cannot
contain blank values");
+ throw invalid;
+ }
+
+
clientAppTO.getTokenExchangeRequiredActorTokenAttributes().forEach((name,
expressions) -> {
+ if (StringUtils.isBlank(name) || expressions == null ||
expressions.isEmpty()
+ || expressions.stream().anyMatch(StringUtils::isBlank)) {
+ SyncopeClientException invalid =
SyncopeClientException.build(ClientExceptionType.InvalidValues);
+ invalid.getElements().add("Invalid token exchange actor token
attributes");
+ throw invalid;
+ }
+ try {
+ expressions.forEach(Pattern::compile);
Review Comment:
@mdisabatino this must be addressed, it can imply security risks
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]