url encode data from msg_handler content script (#2170)

This commit is contained in:
Kyle Spearrin 2021-11-09 12:26:17 -05:00 committed by GitHub
parent d71c945d8b
commit 0039d4aaea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -138,7 +138,7 @@ export default class RuntimeBackground {
try {
BrowserApi.createNewTab('popup/index.html?uilocation=popout#/sso?code=' +
msg.code + '&state=' + msg.state);
encodeURIComponent(msg.code) + '&state=' + encodeURIComponent(msg.state));
}
catch {
this.logService.error('Unable to open sso popout tab');
@ -151,7 +151,8 @@ export default class RuntimeBackground {
return;
}
const params = `webAuthnResponse=${encodeURIComponent(msg.data)};remember=${msg.remember}`;
const params = `webAuthnResponse=${encodeURIComponent(msg.data)};` +
`remember=${encodeURIComponent(msg.remember)}`;
BrowserApi.createNewTab(`popup/index.html?uilocation=popout#/2fa;${params}`, undefined, false);
break;
case 'reloadPopup':