1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

[EC-639] Replacing apostrophe char for email values in Policies API request (#4390)

* [EC-639] Replacing single quote char for email values in Policies API request

* [EC-639] Added Utils.encodeRFC3986URIComponent and used in PolicyApiService and TwoFactorAuthenticatorComponent

* [EC-639] Added unit tests for Utils.encodeRFC3986URIComponent
This commit is contained in:
Rui Tomé
2023-01-25 14:00:46 +00:00
committed by GitHub
parent d40a891f71
commit 4a3bb4b241
4 changed files with 33 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUti
import { StateService } from "@bitwarden/common/abstractions/state.service";
import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction";
import { TwoFactorProviderType } from "@bitwarden/common/enums/twoFactorProviderType";
import { Utils } from "@bitwarden/common/misc/utils";
import { UpdateTwoFactorAuthenticatorRequest } from "@bitwarden/common/models/request/update-two-factor-authenticator.request";
import { TwoFactorAuthenticatorResponse } from "@bitwarden/common/models/response/two-factor-authenticator.response";
import { AuthResponse } from "@bitwarden/common/types/authResponse";
@@ -99,7 +100,7 @@ export class TwoFactorAuthenticatorComponent
element: document.getElementById("qr"),
value:
"otpauth://totp/Bitwarden:" +
encodeURIComponent(email) +
Utils.encodeRFC3986URIComponent(email) +
"?secret=" +
encodeURIComponent(this.key) +
"&issuer=Bitwarden",