mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
Auth/ps 2465 fix knowndevices path (#4710)
* PS-2450 EC-1073 Do not decode and normalize query Co-authored-by: Jake Fink <jfink@bitwarden.com> * Use encoded query parameters over path * Prefer POST for requests with sensitive information * Send private information in headers over query * B64 encode email --------- Co-authored-by: Jake Fink <jfink@bitwarden.com>
This commit is contained in:
@@ -1212,8 +1212,10 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getKnownDevice(email: string, deviceIdentifier: string): Promise<boolean> {
|
async getKnownDevice(email: string, deviceIdentifier: string): Promise<boolean> {
|
||||||
const path = `/devices/knowndevice/${email}/${deviceIdentifier}`;
|
const r = await this.send("GET", "/devices/knowndevice", null, false, true, null, (headers) => {
|
||||||
const r = await this.send("GET", path, null, false, true);
|
headers.set("X-Device-Identifier", deviceIdentifier);
|
||||||
|
headers.set("X-Request-Email", Utils.fromUtf8ToUrlB64(email));
|
||||||
|
});
|
||||||
return r as boolean;
|
return r as boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user