use swal titletext to avoid XSS (#884)

This commit is contained in:
Kyle Spearrin 2021-05-13 15:22:52 -04:00 committed by GitHub
parent 55b0118240
commit 0d5d8b671d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ export class ElectronPlatformUtilsService extends BaseElectronPlatformUtilsServi
Promise<boolean> {
const result = await Swal.fire({
heightAuto: false,
title: title,
titleText: title,
input: 'password',
text: body,
confirmButtonText: this.i18nService.t('ok'),

View File

@ -53,7 +53,7 @@ export class NativeMessagingService {
// Await confirmation that fingerprint is correct
const submitted = await Swal.fire({
title: this.i18nService.t('verifyBrowserTitle'),
titleText: this.i18nService.t('verifyBrowserTitle'),
html: `${this.i18nService.t('verifyBrowserDesc')}<br><br><strong>${fingerprint}</strong>`,
showCancelButton: true,
cancelButtonText: this.i18nService.t('cancel'),