The analysis of the provided commits reveals two distinct cross-site scripting (XSS) vulnerabilities within the Liferay Portal's message boards functionality, both requiring an authenticated user to exploit.
The first vulnerability, identified in commit cd1c692dfed3bbebe10074ecb89c561893fffaf9, is a reflected XSS issue. The getTitle method within the DefaultMBHomeDisplayContext class was directly using a category's name to generate a title for the edit page. Since the category name is user-controllable, an attacker could create a category with a name containing a JavaScript payload. When this category's edit page was loaded, the payload would be rendered unescaped in the page's title, leading to script execution in the user's browser. The patch addresses this by wrapping the category.getName() call with HtmlUtil.escape(), which neutralizes any embedded scripts.
The second vulnerability, addressed in commit 41708aa542c103521427ecf06f4b20cb37c65ecf, is a more complex XSS issue related to the CKEditor component and Liferay's Single Page Application (SPA) architecture. The editor's content was not being correctly processed or cleaned upon navigating away from the editing page (a screenDeactivate event in the SPA). This allowed malicious content to persist in the editor's state. The fix introduces an event listener for screenDeactivate in BaseEditor.js. This listener iterates through all active CKEditor instances and calls the setData() method, which forces the editor to process its current content, thereby preventing the execution of injected scripts during SPA transitions.