Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-26255

The authorization bridge recognizes the guest user name only with its exact case

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 5.0-milestone-2
    • Security
    • None
    • Unknown

    Description

      The user API identifies the guest user from its stored name without regard to case: the document UserReferenceResolver<String> (and so GroupManager#getMembers) returns GuestUserReference for XWiki.xwikiguest, XWikiRightService#isGuest uses equalsIgnoreCase, and the registration rejects any case variant of XWikiGuest. The authorization bridge only recognizes the exact XWikiGuest page name, so a different case is handled as a regular user:

      • XWikiSecurityRule: the users of a rights object (a rule stored for XWiki.xwikiguest doesn't apply to the guest user)
      • XWikiCachingRightService (3 places): the user passed to the old rights API
      • DefaultContextualAuthorizationManager: the content author of a document
      • DefaultSecurityEntryReader: the creator of a document

      STEPS TO REPRODUCE:

      1. Add a rights object to a page denying view to the user XWiki.xwikiguest
      2. View the page as guest

      EXPECTED RESULTS:

      • The page can't be viewed, the same way as with XWiki.XWikiGuest

      ACTUAL RESULTS:

      • The rule is ignored for the guest user

      (Derived from the code of XWikiSecurityRule, not reproduced on a running instance.)

      The authorization bridge should recognize the guest user the same way as the user API.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: