legacy-knowledge-base
公開されました Sep. 10, 2025

FreeMarkerの変数utilLocator、objectUtil、staticUtilを使用した場合のリスクは何ですか?

written-by

Lucas Mesquita

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 変数utilLocator、objectUtil、staticUtilはFreeMarkerエンジンに制限され、アクセスできない。
  • これらの変数を使用した場合のリスクは?

Environment

  • すべての環境

解決策

  • 制限がない場合、Freemarkerテンプレート(ADT)は重要なポータルコンポーネントにアクセスすることができます。 この変数の権限によっては、Freemarkerモデルが特権のあるポータルリソースにアクセスする原因となります。
  • このリスクを軽減するためには、信頼できるユーザーだけに必要な権限を与えることが必要です。 お客様の環境でモデルを追加/更新できる人を制限することで、潜在的な悪用リスクを最小化することができます。
  • また、既存のテンプレートの所有者は、提供されたテンプレートの全権限を有しているため、レビューが必要な場合があります。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base