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

Force context author to be guest in case of restricted execution

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 13.10.10
    • Old Core
    • None
    • Unknown

    Description

      Right now the way restricted context work, it's transformations (and especially macros) which have to take it into account. Since the point of using the restricted context is that we don't trust the context author, we could also protect it even more and set the context author to guest.

      One difficulty with that is the fact that right now it's not possible to make the difference between "there is no context user" and "the context user is guest" with the reference XWikiContext#getAuthorReference(), but fortunately we can make the difference the way the context author is actually stored in the context. So the solution for it would be to start by deprecating XWikiContext#getAuthorReference() to replace it with an API which return a UserReference (which is something we need to do anyway) since UserReference does make the difference between "no user" and "guest user".

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: