From: Wouter Admiraal Date: Tue, 16 Jun 2020 12:11:39 +0000 (+0200) Subject: SONAR-13324 SONAR-13354 Fix SSF-108 and SSF-111 X-Git-Tag: 8.4.0.35506~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5e93a5a3e81c5285e354d4632024c31581bd7ae5;p=sonarqube.git SONAR-13324 SONAR-13354 Fix SSF-108 and SSF-111 --- diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx index 372d15174f4..32c9d1c9c2a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as classNames from 'classnames'; +import { sanitize } from 'dompurify'; import * as React from 'react'; import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; @@ -225,8 +226,8 @@ export default class ActivationFormModal extends React.PureComponent )) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx index bf85766a4c7..40d85d3e191 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.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 * as React from 'react'; import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; @@ -304,8 +305,8 @@ export default class CustomRuleFormModal extends React.PureComponent ); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx index bda70cc34c9..0ff0289db2b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.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 * as React from 'react'; import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; @@ -112,8 +113,8 @@ export default class RuleDetailsDescription extends React.PureComponent )} {this.props.canWrite && ( @@ -194,8 +195,8 @@ export default class RuleDetailsDescription extends React.PureComponent ) : (
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx index fe95a837903..a62c60867ae 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.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 * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; @@ -29,8 +30,9 @@ export default class RuleDetailsParameters extends React.PureComponent { {param.key} -

{param.defaultValue !== undefined && (