Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
4.0-milestone-2
-
None
-
Unknown
-
Description
In the DocumentReference based APIs (AuthorizationManager, GroupManager, ...) the guest user is represented by null. The user DocumentReferenceResolver<String> (UserAndGroupDocumentReferenceResolver) follows this convention for a null value, but not for the value under which the guest user is stored in rights and group objects.
STEPS TO REPRODUCE:
- Resolve XWiki.XWikiGuest (or XWikiGuest) with the user DocumentReferenceResolver<String>
EXPECTED RESULTS:
- null, the guest user, like for a null value
ACTUAL RESULTS:
- the document reference xwiki:XWiki.XWikiGuest, which doesn't designate any actual user
As a consequence, each code reading stored user values has to check the page name of the resolved reference itself, for example XWikiSecurityRule, which turns a resolved XWikiGuest user into null to match the guest user.
Things to check
- every caller of the user and group resolvers must support a null result for a non-null value: XWikiSecurityRule (via DefaultSecurityEntryReader), DefaultSecurityCacheRulesInvalidatorListener, WikiOwnerUpdater, DefaultWikiDescriptorBuilder, and extensions looking them up by hint
- whether the group hint, served by the same component, should behave the same way
- the matching (exact case, like XWikiSecurityRule and the authorization bridge, or case insensitive, like XWikiRightService#isGuest)
Fixing it changes the behavior of an existing component, so it needs to be discussed on the forum first.
Attachments
Issue Links
- is related to
-
XWIKI-26255 The authorization bridge recognizes the guest user name only with its exact case
-
- Open
-
- relates to
-
XWIKI-25739 The guest user can be returned as a member of a group
-
- Closed
-