Bug 35339 - JNDIPrincipalStore fails in parseLdapName
Summary: JNDIPrincipalStore fails in parseLdapName
Status: RESOLVED FIXED
Alias: None
Product: Slide
Classification: Unclassified
Component: Stores (show other bugs)
Version: 2.1
Hardware: All All
: P1 major (vote)
Target Milestone: 2.2
Assignee: Slide Developer List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-13 11:06 UTC by David Delbecq
Modified: 2006-10-28 18:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Delbecq 2005-06-13 11:06:21 UTC
parseLdapName assume, if not '=' character is found in the name argument, '=' 
is at index. It should be -1 or gets a special process. 
For now, parseLdapName("someuser") returns "omeuser", stripping the first 
character. This is a problem when using the NIS context factory, where 
result.getName() returns simply the username. As a consequence, store is 
unusable because it reacts badly when asked later to find the object 
"/users/omeuser" 
 
 
Proposed solution: 
if (name.indexOf("=")<0) return name; 
in the method
Comment 1 Martin Petras 2006-10-24 05:21:38 UTC
(In reply to comment #0)
> parseLdapName assume, if not '=' character is found in the name argument, '=' 
> is at index. It should be -1 or gets a special process. 
> For now, parseLdapName("someuser") returns "omeuser", stripping the first 
> character. This is a problem when using the NIS context factory, where 
> result.getName() returns simply the username. As a consequence, store is 
> unusable because it reacts badly when asked later to find the object 
> "/users/omeuser" 
>  
>  
> Proposed solution: 
> if (name.indexOf("=")<0) return name; 
> in the method

or comment out this portion of the code:

if ( firstEqual < 0 ) {
   firstEqual = 0;
}
Comment 2 Antoine Levy-Lambert 2006-10-24 17:47:01 UTC
Proposed solution to remove the 3 lines :
if ( firstEqual < 0 ) {
   firstEqual = 0;
}
implemented.

Can you please do a svn update and rebuild from the sources to check that it works ?
Regards,
Antoine