legacy-knowledge-base
公開されました Jul. 2, 2025

無効なCSRFトークンの警告

written-by

Alexandra Rujzam

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

問題

portal-ext.properties で portlet.url.anchor.enable=true を設定した場合、ログに Invalid CSRF Token の警告が表示されるようになりました。

User 20127 is not allowed to access URL http://localhost:8080/web/guest/home and portlet com_liferay_message_boards_web_portlet_MBPortlet: User 20127 did not provide a valid CSRF token for com.liferay.portlet.SecurityPortletContainerWrapper

Environment

  • Liferay DXP 7.2

解決策

この問題は DXP 7.2 FP5+ (liferay-fixpack-dxp-5-7210) で LPS-109009によって修正されるはずです。

portal-ext.propertiesに上記のプロパティを設定せずに、この特定のエラーが表示された場合、以下の操作で問題が解決されるはずです。

データベースの8 com.liferay.portal.upload.internal.configuration.UploadServletRequestConfigurationconfigファイルをosgi/configフォルダーから削除し、この行をconfiguration_テーブルから削除して、手動で設定する「全体の最大アップロードリクエストサイズ」のより高い値「コントロールパネル構成システム設定インフラストラクチャサーブレットリクエストのアップロード」セクション。

did-this-article-resolve-your-issue

legacy-knowledge-base