1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-15 07:43:45 +00:00

Use UrlB64 encoding for auth-email header (#450)

This commit is contained in:
Thomas Rittson
2021-08-11 06:33:15 +10:00
committed by GitHub
parent c2e434e333
commit c694591e4c
2 changed files with 7 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ import { TwoFactorProviderType } from '../../enums/twoFactorProviderType';
import { CaptchaProtectedRequest } from './captchaProtectedRequest';
import { DeviceRequest } from './deviceRequest';
import { Utils } from '../../misc/utils';
export class TokenRequest implements CaptchaProtectedRequest {
email: string;
masterPasswordHash: string;
@@ -76,7 +78,7 @@ export class TokenRequest implements CaptchaProtectedRequest {
alterIdentityTokenHeaders(headers: Headers) {
if (this.clientSecret == null && this.masterPasswordHash != null && this.email != null) {
headers.set('Auth-Email', this.email);
headers.set('Auth-Email', Utils.fromUtf8ToUrlB64(this.email));
}
}
}