xwiki/xwiki-platform — comment on commit 35a4e5795ae0fd7ea593ca919a92dce4a1ca03e3
File:  line 0
By sdumitriu:

Hm, actually the test failed to detect that the code is completely useless... When the event occurs the user has already been set to null. Both the old and the new code try to remove the token for the guest user. And not only does this fail to forget the token for the logged out user, but it will cause the resubmit dialog to be displayed a lot more often for guest users (if they have edit rights).

I really don't like the way login/logout happens, as a side effect of com.xpn.xwiki.XWiki.prepareDocuments(XWikiRequest, XWikiContext, VelocityContext)