This issue has been created
There is 1 comment.
 
 
LDAP / cid:jira-generated-image-avatar-491f5e4c-2a73-4409-b3a4-2aa2a0f8185d LDAP-166 Open

Can't authenticate if ldap user has attribute with length greater than 768 characters

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-befaad6c-b95f-4aaf-a643-5a41cf9edf35 Teodor Caras created this issue on 06/Apr/26 14:38
 
Summary: Can't authenticate if ldap user has attribute with length greater than 768 characters
Issue Type: cid:jira-generated-image-avatar-491f5e4c-2a73-4409-b3a4-2aa2a0f8185d Bug
Affects Versions: 9.16.1
Assignee: Unassigned
Components: Authenticator
Created: 06/Apr/26 14:38
Priority: cid:jira-generated-image-static-major-520dcf2e-f728-4e4e-bd0f-98d8a90428a7 Major
Reporter: Teodor Caras
Description:

Steps to reproduce:

  1. Create an ldap user with a mail (or any other attribute) of length greater than 768
  2. On xwiki, create an attribute mapping from XWiki's email to the ldap mail attribute
  3. Setup the correct connection between xwiki and ldap
  4. Try to authenticate with the configured user

Excepted:

The user successfully logs in

Actual:

The login fails and the following error is present in the logs:

 

 
2026-04-06 15:17:35,925 [qtp1039949752-32 - http://localhost:8080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Error: 3401, SQLState: 22001 
2026-04-06 15:17:35,926 [qtp1039949752-32 - http://localhost:8080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] ERROR o.h.e.j.s.SqlExceptionHelper   - data exception: string data, right truncation ; size limit: 768 table: XWIKISTRINGS column: XWS_VALUE 
2026-04-06 15:17:35,934 [qtp1039949752-32 - http://localhost:8080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] WARN  nticationFailureLoggerListener - Authentication failure with login [RetiredAccName] 

 

 
 

1 comment

 
cid:jira-generated-image-avatar-befaad6c-b95f-4aaf-a643-5a41cf9edf35 Teodor Caras on 06/Apr/26 14:40
 

A possible workaround would be to skip that attribute from the mapping or map it to some xwiki user attribute that is of type "LargeString".

What would be a solution to this issue tho? Trim the fields before saving the user profile? Skip them entirely?