diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2020-06-19 10:47:02 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-06-30 20:05:42 +0000 |
commit | b3840f39050b6a805c321748c84726038ccb3f6a (patch) | |
tree | b43640482300151448d6a1bebf8c9a9bb870afd6 | |
parent | 5e93a5a3e81c5285e354d4632024c31581bd7ae5 (diff) | |
download | sonarqube-b3840f39050b6a805c321748c84726038ccb3f6a.tar.gz sonarqube-b3840f39050b6a805c321748c84726038ccb3f6a.zip |
SONAR-11914 Fix SSF-76
-rw-r--r-- | server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx index c8cac2354f3..4f53635a2c8 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { sanitize } from 'dompurify'; import { Location } from 'history'; import { keyBy } from 'lodash'; import * as React from 'react'; @@ -159,8 +160,8 @@ export class AboutApp extends React.PureComponent<Props, State> { {customText && ( <div className="about-page-section" - // Safe: Defined by instance admin - dangerouslySetInnerHTML={{ __html: customText }} + // eslint-disable-next-line react/no-danger + dangerouslySetInnerHTML={{ __html: sanitize(customText) }} /> )} |