legacy-knowledge-base
公開されました Jun. 30, 2025

ボタンの断片の中にスクリプトがあることは、潜在的なXSS脆弱性として認められるのでしょうか?

written-by

István Gergely-Tárnoki

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

問題

  • ButtonフラグメントのURLフィールドにJavascriptコードを記述することで、ボタンをクリックしたときに次のように実行されます。 javascript:alert(document.cookie)
  • クロスサイト・スクリプティング(XSS)の脆弱性ではないか?

Environment

  • Liferay DXP 7.3+

解決策

  • そのため、URLを扱う管理者(または編集者)は、そのボタンを使ってJavascriptを起動することができます。
  • ページ上のフラグメントは、ページを構成する利用可能なHTML機能にアクセスできなければならない。 この場合ここでは <a>タグはそのhref属性にjavascriptを含めることができます。
did-this-article-resolve-your-issue

legacy-knowledge-base