mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
don't use innerHTML for sso handOffMessage (#1285)
This commit is contained in:
@@ -25,8 +25,11 @@ function initiateBrowserSso(code: string, state: string) {
|
|||||||
window.postMessage({ command: 'authResult', code: code, state: state }, '*');
|
window.postMessage({ command: 'authResult', code: code, state: state }, '*');
|
||||||
const handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift();
|
const handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift();
|
||||||
document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0';
|
document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0';
|
||||||
document.getElementById('content').innerHTML =
|
let content = document.getElementById('content');
|
||||||
`<p>${handOffMessage}</p>`;
|
content.innerHTML = '';
|
||||||
|
let p = document.createElement('p');
|
||||||
|
p.innerText = handOffMessage;
|
||||||
|
content.appendChild(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractFromRegex(s: string, regexString: string) {
|
function extractFromRegex(s: string, regexString: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user