Live Data LiveTable source cannot filter doc.creator when username contains a dot

For a troubleshooting guide, we have created a new class modelled on the FAQ tutorial. Fields such as ‘Problem’, ‘Solution’ and ‘Symptoms’ are correctly listed as a LiveData table, and filtering works. However, it does not work when I try to filter by ‘Author’.

Our users are created with the mailadress as username after a login using the OpenID Connect Authenticator Extension.

Possible cause

Live Data serializes the users mailadress as an escaped XWiki document reference, but
the LiveTable backend appears to compare that escaped serialization directly
with XWikiDocument.creator → XWiki.foo@domain.com not equal to XWiki.foo@domain\.com

XWiki version:
17.10.4

Macro:

{{liveData
id=“troubleshootingguide”
source=“liveTable”
properties=“doc.title,error-message,doc.creationDate,doc.date,doc.creator,tags”
sourceParameters=“translationPrefix=Customization.&className=Customization.TroubleshootingEntryClass&tags_class=XWiki.TagClass”
}}

Steps to reproduce:

  1. Create an entry with creator XWiki.devops.
  2. Create another entry with creator XWiki.foo@domain.com.
  3. Filter the doc.creator column.

Actual result:

Filtering for XWiki.devops works.

Filtering for the email-based user returns no results.

XWiki.kbr@domain.com

Expected result:

The filter should match the documents created by XWiki.foo@domain.com.

Thank you in advance for help or maybe a hint.

At least historically, XWiki didn’t really support usernames containing . and normally, authenticators should clean usernames to remove such characters. We have recently fixed some places, but it looks like you found another one. Feel free to open a bug report at https://jira.xwiki.org.

I just checked the authenticator documentation which would handle the username correctly, per default.

#-# The default is: 
# oidc.user.nameFormater=${oidc.issuer.host._clean}-${oidc.user.preferredUsername._clean}
#-# You can customize the set of forbidden characters that are cleaned by the ".clean" operation by defining a pattern using the Java regex syntax. You can also decide to replace this pattern with some fixed string instead of removing the matches altogether.
#-# For instance, to match the default behavior of the Confluence XML importer:
# oidc.user.nameForbiddenPattern=[. /]
# oidc.user.nameForbiddenReplacement=_

For aesthetic reasons, we decided to use the full email address rather than the cleaned-up version. I wasn’t aware of the implications this might have.

I will still create a bug ticket. Thank you :slight_smile: