[ 
https://issues.apache.org/jira/browse/SYNCOPE-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675171#comment-16675171
 ] 

ASF GitHub Bot commented on SYNCOPE-1393:
-----------------------------------------

ilgrosso closed pull request #88: SYNCOPE-1393 jexl function fullPath2Dn(final 
String fullPath, final S…
URL: https://github.com/apache/syncope/pull/88
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java
 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java
index a3b5c36831..d9a287952b 100644
--- 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java
+++ 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java
@@ -57,7 +57,7 @@ public String fullPath2Dn(final String fullPath, final String 
attr) {
     public String fullPath2Dn(final String fullPath, final String attr, final 
String prefix) {
         String[] fullPathSplitted = fullPath.split("/");
         if (fullPathSplitted == null || fullPathSplitted.length <= 1) {
-            return prefix;
+            return StringUtils.EMPTY;
         }
 
         List<String> headless = Arrays.asList(fullPathSplitted).subList(1, 
fullPathSplitted.length);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> jexl function fullPath2Dn return invalid value for ROOT realm
> -------------------------------------------------------------
>
>                 Key: SYNCOPE-1393
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1393
>             Project: Syncope
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.10, 2.1.1
>            Reporter: Alexander Tsvetkov
>            Assignee: Francesco Chicchiriccò
>            Priority: Minor
>             Fix For: 2.0.12, 2.1.3, 3.0.0
>
>
> In mapping I have Object link: 
> 'cn=' + username + syncope:fullPath2Dn(realm, 'ou', ',') + 
> ',OU=BY,DC=sesdev,DC=lab'
> For root realm it returns value with extra comma:
> 'cn=testUser,,OU=BY,DC=sesdev,DC=lab'
> BUT should return
> 'cn=testUser,OU=BY,DC=sesdev,DC=lab'
> So, for ROOT realm fullPath2Dn(realm, 'ou', ',') should return empty string, 
> BUT not comma.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to