# Limit available macros in restricted mode and enable restricted mode in HTML converter without edit rights

**URL:** <https://forum.xwiki.org/t/limit-available-macros-in-restricted-mode-and-enable-restricted-mode-in-html-converter-without-edit-rights/11353>\
**Category:** Development\
**Tags:** proposal\
**Created:** [November 15, 2022, 10:02am UTC](https://forum.xwiki.org/t/limit-available-macros-in-restricted-mode-and-enable-restricted-mode-in-html-converter-without-edit-rights/11353 "2022-11-15T10:02:41Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![MichaelHamann](https://forum.xwiki.org/user_avatar/forum.xwiki.org/michaelhamann/32/3813_2.png) [@MichaelHamann](https://forum.xwiki.org/u/MichaelHamann)\
**Post date:** [November 18, 2022, 3:06pm UTC](https://forum.xwiki.org/t/limit-available-macros-in-restricted-mode-and-enable-restricted-mode-in-html-converter-without-edit-rights/11353/8 "2022-11-18T15:06:07Z")

</div>

> [@vmassol](#):
>
> we probably need a whitelist parameter (in xwiki.properties), initially containing only a few core macros (ie from commons, rendering and platform). Admins would then need to add macros to this list if they want their users to have more macros available.

Yes, that was exactly my proposal. I suggest introducing a property which macros should be allowed in restricted mode. Initially, I wouldn’t include all core macros, just those for which we believe it makes sense to use them in comments (for example, I wouldn’t include the cache, async, include or display macros).

Note that we’re only talking about macros available in restricted mode, i.e., primarily in comments. In all other contexts, still all macros would be available. This proposal is primarily to limit the attack surface that is available for guest users. Further, it improves the usability by limiting the available macros to macros that make sense in comments (we would need a mechanism similar to what has been discussed for [macro permissions](https://forum.xwiki.org/t/add-concept-of-required-permissions-for-macros/9904) to also make sure those macros aren’t listed in CKEditor).

---

_[View the full topic](https://forum.xwiki.org/t/limit-available-macros-in-restricted-mode-and-enable-restricted-mode-in-html-converter-without-edit-rights/11353)._
